WO2019229845A1 - Program management system, programming assistance device, program management method, and programming assistance program - Google Patents

Program management system, programming assistance device, program management method, and programming assistance program Download PDF

Info

Publication number
WO2019229845A1
WO2019229845A1 PCT/JP2018/020538 JP2018020538W WO2019229845A1 WO 2019229845 A1 WO2019229845 A1 WO 2019229845A1 JP 2018020538 W JP2018020538 W JP 2018020538W WO 2019229845 A1 WO2019229845 A1 WO 2019229845A1
Authority
WO
WIPO (PCT)
Prior art keywords
version
program
execution module
management
programming support
Prior art date
Application number
PCT/JP2018/020538
Other languages
French (fr)
Japanese (ja)
Inventor
遼太 橋本
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to KR1020207033266A priority Critical patent/KR102225850B1/en
Priority to JP2018563933A priority patent/JP6541902B1/en
Priority to CN201880093762.7A priority patent/CN112204479B/en
Priority to PCT/JP2018/020538 priority patent/WO2019229845A1/en
Publication of WO2019229845A1 publication Critical patent/WO2019229845A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • the present invention relates to a program management system, a programming support apparatus, a program management method, and a programming support program for managing programs.
  • a PLC Programmable Logic Controller
  • This control program may be edited by the user to become a new version of the program.
  • a new version of the execution module is created by compiling the difference between the new version of the program and the old version of the program, and the new version of the PLC operating with the old version of the execution module is created.
  • An execution module may be written. Such a process of updating the execution module with respect to the operating PLC is referred to as “running execution” or “run (RUN) writing”.
  • the programmable controller system described in Patent Document 1 associates identification information with an execution module created from a program. This programmable controller system determines, based on the identification information, whether or not the execution module to be downloaded to the PLC is a derivative version created from the master version being executed in the PLC before performing the writing during execution. If it is a derivative version, download is permitted.
  • the present invention has been made in view of the above, and an object thereof is to obtain a program management system capable of efficiently developing a program.
  • the program management system of the present invention uses a first version execution module created by compiling using a first version program to control a controlled device.
  • a programming support device for creating a version execution module is provided.
  • the program management system of the present invention includes a management device that manages an execution module being executed by the control device, the latest version of the program, and compile information indicating whether or not the latest version of the program has been compiled. Prepare.
  • the programming support apparatus When writing the second version of the execution module to the control device that is executing the first version of the execution module, the programming support apparatus is specific to the second version of the program and the second version of the execution module. When the second version of the execution module is not written to the control device that is executing the first version of the execution module, the second version of the program is transmitted to the management device.
  • the management apparatus receives information specific to the second version program and the second version execution module, the management apparatus manages the second version program as the latest version program, and controls the second version execution module to the control apparatus. Is managed as an execution module being executed, and compile information is set to information indicating that it has been compiled.
  • the management apparatus When the management apparatus receives the second version of the program without receiving information specific to the second version of the execution module, the management apparatus manages the second version of the program as the latest version of the program, and the first version of the execution module Is managed as an execution module being executed by the control device, and the compile information is set to information indicating that it has not been compiled.
  • the program management system according to the present invention has an effect that a program can be efficiently developed.
  • the figure which shows the structure of the program management system concerning embodiment of this invention The figure for demonstrating the information memorize
  • stores after the process of FIG. 3 is performed
  • stores after the process of FIG. 5 is performed
  • FIG. 1 is a diagram showing a configuration of a program management system according to an embodiment of the present invention.
  • the program management system 1 is a system that manages the execution module Mx created by compiling the program P, and writes the PLC 10 during execution using the newly created execution module Mx.
  • the program management system 1 manages the execution module Mx so that the version of the execution module Mx that is being executed by the PLC 10 matches the version of the execution module Mx that is read when the execution-in-execution write is about to be performed.
  • the program P can be edited by a plurality of users. When edited by the user, the program P becomes a new version of the program P. When the new version of the program P is compiled, a new version of the execution module Mx is generated. Examples of the program P are programs Pv1 to Pv3 described later, and examples of the execution module Mx are execution modules M1 to M3 described later.
  • “In-execution writing” is a process of updating the execution module of the PLC 10 without stopping the operation of the PLC 10.
  • a new version of the execution module is written to the PLC 10 operating using a specific execution module.
  • an execution module that is a difference from the previous writing is written into the PLC 10.
  • the program management system 1 manages the version of the execution module Mx being executed by the PLC 10, and permits execution writing only to an appropriate execution module Mx corresponding to the execution module Mx being executed by the PLC 10. To do.
  • the program management system 1 includes a PLC 10, which is an example of a control device that controls an industrial machine, a management device 20, and a programming support device 30.
  • the PLC 10 stores an execution module Mx, and controls the controlled device such as an industrial machine using the execution module Mx.
  • the programming support device 30 is a computer that creates an execution module Mx from the program P by compiling the program P for controlling the industrial machine.
  • the management device 20 that is a program management device is a computer that performs version management of the program P and version management of the execution module Mx.
  • the management device 20 is connected to one or more programming support devices 30.
  • One or more programming support devices 30 are each connected to the PLC 10.
  • An example of the management device 20 is a server, and an example of the programming support device 30 is a client device.
  • the programming support device 30 includes a programming support unit 31 that is a programming support tool, and a storage unit 39.
  • the programming support unit 31 has a function of supporting creation of the program P.
  • the programming support unit 31 has a function of creating the program P, a function of editing the program P, and a function of compiling the program P.
  • the programming support unit 31 has a function of transmitting the program P and the execution module Mx to the management device 20 that is an external device, a function of writing the execution module Mx into the PLC 10, and a compile flag managed by the management device 20. 23, and a function of reading the program P and the execution module Mx.
  • a specific example of the function of creating the program P is a function of creating the program P according to an instruction from the user
  • a specific example of the function of editing the program P is a function of editing the program P according to the instruction from the user.
  • the function for compiling the program P is a function for creating the execution module Mx from the program P by compiling the program P.
  • a compiler which is a function for compiling the program P, converts the program P, which is a source code, into an execution module Mx, which is a machine language.
  • the programming support unit 31 may create an execution module Mx for a plurality of programs P, or may create an execution module Mx for each program P.
  • the program P and the execution module Mx transmitted from the programming support unit 31 to the management device 20 are created or edited by the programming support unit 31.
  • the execution module Mx written to the PLC 10 by the programming support unit 31 is created or edited by the programming support unit 31.
  • program P and the execution module Mx that the programming support unit 31 reads from the management device 20 are previously created or edited by the programming support unit 31.
  • the program P and the execution module Mx that the programming support unit 31 reads from the management device 20 may be created or edited by another programming support device 30.
  • the storage unit 39 stores project data 22 that is data for managing the program P and the execution module Mx.
  • the project data 22 is read by the programming support unit 31 from the management apparatus 20 when the programming support unit 31 edits the project data 22.
  • the project data 22 includes a compile flag 23, a program P, and an execution module Mx.
  • the execution module Mx When the program P is compiled and compiled after the program P becomes a new version, the execution module Mx also becomes a new version. Therefore, when the programming support unit 31 compiles a new version of the program P and creates a new version of the execution module Mx, the new version of the execution module Mx is stored in the storage unit 39. Thus, when the programming support unit 31 edits the project data 22, the storage unit 39 stores the edited project data 22.
  • the compile flag 23 which is compile information is a flag indicating whether or not the program P included in the project data 22 has been compiled.
  • the compile flag 23 indicates information about whether or not the program has been compiled for each program.
  • the programming support apparatus 30 edits the program P in accordance with an instruction from the user and saves the program P, and compiles the edited program P in accordance with the instruction from the user and writes it to the PLC 10 during execution. There is.
  • the programming support device 30 compiles the edited program P according to an instruction from the user and writes the program P during execution to the PLC 10, the difference between the edited program P and the program P corresponding to the execution module Mx being executed in the PLC 10 And an execution module corresponding to the difference is created.
  • An example of the execution module corresponding to the difference is an execution module M3 described later.
  • the programming support apparatus 30 writes the execution in progress to the PLC 10 using the differential execution module M3, and further stores the differential execution module M3 in the management apparatus 20.
  • the programming support apparatus 30 may create an execution module corresponding to the difference between the execution module of the edited program P and the execution module Mx being executed by the PLC 10. Also in this case, an example of an execution module corresponding to the difference is an execution module M3 described later.
  • the difference between the edited program P and the program P corresponding to the execution module Mx being executed by the PLC 10 is a specific line added by editing the program P.
  • the difference between the edited program P and the program P corresponding to the execution module Mx being executed by the PLC 10 is the difference between a specific program among the plurality of programs. The whole may be sufficient.
  • the programming support unit 31 that is a programming support tool may be a part of an engineering tool.
  • the engineering tool is application software for the programming support device 30 to make various settings to the PLC 10 in accordance with instructions from the user.
  • the management device 20 includes a version management unit 21 that is a version management tool, and a storage unit 29.
  • the version management unit 21 manages the project data 22 sent from the programming support device 30. Specifically, the version management unit 21 manages the execution module Mx and the program P sent from the programming support device 30.
  • the version management unit 21 manages the compile flag 23 and the version information 25.
  • the version management unit 21 When the version management unit 21 receives the project data 22 from the programming support device 30, the version management unit 21 stores the project data 22 in the storage unit 29. Therefore, when the program P is edited by the programming support device 30 to become a new version of the program P, the new version of the program P is stored in the storage unit 29.
  • the storage unit 29 stores the project data 22 in accordance with instructions from the version management unit 21. Similarly to the project data 22 stored in the storage unit 39, the project data 22 stored in the storage unit 29 includes a compile flag 23, a program P, and an execution module Mx. The storage unit 29 stores version information 25.
  • the storage unit 29 may store a plurality of project data 22. Each project data 22 may include a plurality of programs P.
  • the version management unit 21 may be disposed in the programming support device 30 or may be disposed other than the programming support device 30 and the management device 20.
  • the version management unit 21 updates the compile flag 23 when the program P is edited by the programming support device 30 to become a new version. If the program P is not compiled after being edited, the version management unit 21 sets the compilation flag 23 to be uncompiled, and if the program P is compiled after being edited, the version management unit 21 sets the compilation flag 23 to be compiled. In the present embodiment, as will be described later, when the execution module Mx is written in the PLC 10, the compile flag 23 is set to be compiled. Therefore, the compile flag 23 indicates whether or not the execution module Mx is written in the PLC 10. It can be said that this is a flag indicating.
  • the version management unit 21 edits the version information 25 based on the program P sent from the programming support device 30 and the version of the program P.
  • the version information 25 is information managed by the version management unit 21.
  • the program P and the version of the program P are associated with each other. For example, when the program Pv1 which is an example of the program P is the first version and the program Pv2 which is an example of the program P is the second version, the version information 25 corresponds to the information indicating the program Pv1 and the first version.
  • the program Pv2 is associated with information indicating the second version.
  • the version management unit 21 associates the new version with the program P and registers it in the version information 25.
  • FIG. 2 is a diagram for explaining information stored at a timing when the management apparatus according to the embodiment starts managing the project data.
  • FIG. 2 illustrates a case where a program Pv1 that is an example of the program P and an execution module M1 that is an example of the execution module Mx are created.
  • the programming support unit 31 When the programming support unit 31 creates the first version of the program Pv1, the programming support unit 31 compiles the program Pv1 to create an execution module M1 that is an execution module of the first version. Then, the programming support unit 31 transmits the created execution module M1 to the PLC 10 and writes it in the PLC 10. At this time, the programming support unit 31 creates project data 22 including the created program Pv1 and the execution module M1, and transmits the created project data 22 to the management apparatus 20. Thereby, PLC10 starts control of an industrial machine using the execution module M1, and the management apparatus 20 memorize
  • the storage unit 29 stores the project data 22 including the compile flag 23 set as compiled, the program Pv1, and the execution module M1.
  • the version management unit 21 registers information identifying the program Pv1 and a version number indicating the version of the program Pv1 in the version information 25. This version number is specified by the user. For example, when “ver.1” is designated as the version of the program Pv1, the version management unit 21 includes information for identifying the first version of the program Pv1 and “ver.1” indicating the first version. Are registered in the version information 25 in association with each other. An example of information for identifying the program Pv1 is the name of the program Pv1.
  • the programming support unit 31 reads out the program Pv1 from the management device 20 in accordance with an instruction from the user and stores it in the storage unit 39. Then, the programming support unit 31 edits the program Pv1 in accordance with an instruction from the user. In this case, there are a case where the user only edits the program Pv1 and does not reflect it in the PLC 10, and a case where the user wants to reflect the program Pv1 in the PLC 10 after editing the program Pv1.
  • the first version of the program Pv1 is compiled, the first version of the execution module M1 is obtained, and when the second version of the program Pv2 is compiled, the second version of the execution module M2 (not shown) is obtained.
  • the program Pv3 is compiled, the third version of the execution module M3 is obtained.
  • FIG. 3 is a flowchart illustrating a processing procedure when the program is edited but not written to the PLC in the program management system according to the embodiment.
  • the programming support unit 31 of the programming support device 30 reads the program Pv1, the compile flag 23, and the execution module M1 from the management device 20 in accordance with an instruction from the user AA.
  • Obtain (step S10).
  • the program Pv1, the compile flag 23, and the execution module M1 are stored in the storage unit 39.
  • the programming support unit 31 of the programming support device 30 edits the program Pv1 in accordance with an instruction from the user AA to create a new version of the program Pv2 (step S20).
  • the programming support unit 31 creates the program Pv2 with the same file name as the program Pv1, and updates the version number. For example, when the user AA specifies “ver.2” as the version of the program Pv2, the programming support unit 31 associates the program Pv2 with “ver.2”.
  • the programming support unit 31 of the programming support device 30 transmits the program Pv2 associated with “ver. 2” to the version management unit 21 of the management device 20 (step S30). At this time, the programming support unit 31 designates the project data 22 corresponding to the read program Pv1, and transmits the program Pv2 to the version management unit 21.
  • the version management unit 21 of the management apparatus 20 includes the program Pv2 in the designated project data 22. That is, the storage unit 29 of the management device 20 stores the program Pv2. Furthermore, since the execution module M2 corresponding to the program Pv2 has not been sent in the management device 20, the version management unit 21 of the management device 20 changes the compile flag 23 of the program Pv2 to uncompiled (step S40). Also, the version management unit 21 associates information for identifying the program Pv2 with “ver.2” indicating the version of the program Pv2, and registers the information in the version information 25.
  • the programming support unit 31 may compile the program Pv2 in accordance with an instruction from the user AA, thereby creating an execution module M2 corresponding to the program Pv2. Even in this case, the programming support unit 31 does not transmit the execution module M2 to the PLC 10 or the management apparatus 20 when there is no instruction for writing the execution module M2 to the PLC 10 from the user AA. Thereby, the identity of the execution module M1 in the PLC 10 and the execution module M1 managed by the management device 20 can be maintained. If writing during execution is not performed, the acquisition of the compile flag 23 and the execution module M1 may be omitted in step S10.
  • FIG. 4 is a diagram for explaining information stored in the management apparatus according to the embodiment after the process of FIG. 3 is executed.
  • the version management unit 21 of the management device 20 stores the program Pv2 in the storage unit 29.
  • the version management unit 21 changes the file stored with the file name of the program Pv1 to the contents of the program Pv2. Therefore, in the storage unit 29, the content of the program Pv1 is changed to the content of the program Pv2 while maintaining the file name.
  • the program Pv1 may be stored in an area different from the area where the program Pv2 is stored in the storage unit 29.
  • the version management unit 21 may store the difference between the program Pv1 and the program Pv2 in the storage unit 29 instead of the program Pv2.
  • the version management unit 21 rewrites the compile flag 23 of the program Pv2 from compiled to uncompiled. Further, the execution module M1 is not updated. Accordingly, the storage unit 29 stores the project data 22 including the compile flag 23 indicating uncompiled, the program Pv2, and the execution module M1.
  • the version management unit 21 registers information identifying the program Pv2 and the version number indicating the version of the program Pv2 in the version information 25. This version number is specified by the user. For example, when “ver.2” is designated as the version of the program Pv2, the version management unit 21 associates information for identifying the second version of the program Pv2 with “ver.2” indicating the second version. And registered in the version information 25.
  • FIG. 5 is a flowchart showing a processing procedure when the program is edited and written in the PLC in the program management system according to the embodiment.
  • the user BB who is the second user may edit the program Pv2 with the programming support device 30 used by the user AA, or edit the program Pv2 with a programming support device different from the programming support device 30 used by the user AA. May be.
  • a case where the user BB edits the program Pv2 with the programming support device 30 used by the user AA will be described.
  • the processes in steps S110 to S170 described below are processes executed by the programming support apparatus 30, and the process in step S180 is a process executed by the management apparatus 20.
  • the programming support unit 31 of the programming support device 30 reads and acquires the program Pv2, the compile flag 23, and the execution module M1 from the management device 20 in accordance with an instruction from the user BB (step S110). .
  • the program Pv2, the compile flag 23, and the execution module M1 are stored in the storage unit 39.
  • the programming support unit 31 of the programming support device 30 edits the program Pv2 according to the instruction of the user BB and creates the program Pv3 (step S120). Furthermore, when the programming support unit 31 of the programming support device 30 receives an instruction to write the program Pv3 to the PLC 10 from the user BB (step S130), whether or not the program Pv2 acquired from the management device 20 is the latest version of the program. Is determined (step S140).
  • the reason for determining whether or not the program Pv2 acquired from the management apparatus 20 is the latest version of the program will be described.
  • the program editing may be performed by another user CC while the user BB is editing the program.
  • the user CC may create the program Pv4 from the program Pv2 while the user BB is creating the program Pv3 from the program Pv2. If the program Pv4 is registered in the storage unit 29 before the program Pv3 is registered in the storage unit 29, the program Pv4 becomes the latest version program, and the program Pv2 is not the latest version.
  • the programming support unit 31 determines whether or not the program Pv2 acquired from the management apparatus 20 is the latest version program before writing the program Pv3 into the PLC 10.
  • step S140 When the program Pv2 acquired from the management device 20 is not the latest version program (No in step S140), the program Pv3 is edited from a program that is not the latest version, and therefore the programming support unit 31 of the programming support device 30 is used. Determines that writing to the PLC 10 is not possible (step S150). Thus, the programming support unit 31 does not create the execution module M2 when the program Pv2 is not the latest version of the program.
  • step S140 when the program Pv2 acquired from the management device 20 is the latest version of the program (step S140, Yes), the programming support unit 31 of the programming support device 30 acquires the execution module M1 in the PLC 10 and the management device 20. It is confirmed whether or not the execution module M1 is the same (step S155).
  • the programming support unit 31 determines the identity of the execution module M1, for example, by comparing the hash values of the binary data of the execution module M1. In this case, the programming support unit 31 calculates the first hash value from the binary data of the execution module M1 in the PLC 10, and from this, the binary of the execution module M1 acquired from the management device 20 when attempting to perform the write during execution. A second hash value is calculated from the data. Then, the programming support unit 31 compares the calculated first hash value with the second hash value. Based on the comparison result, the programming support unit 31 determines whether or not the execution module M1 in the PLC 10 is the same as the execution module M1 acquired from the management apparatus 20 when an ongoing write is to be performed. Determine.
  • the programming support unit 31 determines the identity of the execution module M1 by comparing the first hash value and the second hash value, the programming support unit 31 uses the second hash instead of the execution module M1.
  • the value may be transmitted to the management device 20. That is, the programming support unit 31 may transmit information unique to the execution module M1 to the management device 20 instead of the execution module M1. Thereby, since the programming support part 31 can acquire the information specific to the execution module M1 from the management apparatus 20, the execution module M1 in the PLC 10 and the execution module M1 managed by the management apparatus 20 are the same. It can be confirmed whether or not.
  • the information unique to the execution module M1 may be the execution module M1 itself.
  • the programming support unit 31 may compare the binary data of the execution module M1 by any method, not limited to the method described above.
  • step S155 If the execution module M1 in the PLC 10 and the execution module M1 acquired from the management device 20 are not the same (No in step S155), there is a possibility that some abnormality has occurred, so the programming support unit of the programming support device 30 31 determines that writing to the PLC 10 is not possible (step S150). In this case, the programming support unit 31 does not create the execution module M2. Thus, the programming support unit 31 does not create the execution module M2 when the execution module M1 in the PLC 10 and the execution module M1 acquired from the management apparatus 20 are not the same.
  • step S155 When the execution module M1 in the PLC 10 and the execution module M1 acquired from the management device 20 are the same (step S155, Yes), the programming support unit 31 of the programming support device 30 sets the program Pv3 that is the edited program. By executing the compilation, an execution module M3 corresponding to the program Pv3 is created (step S156). As described above, when the program Pv2 is the latest version program and the execution module M1 in the PLC 10 is the same as the execution module M1 acquired from the management device 20, the programming support unit 31 executes the execution module M3. Create
  • the programming support unit 31 calculates a difference between the edited program Pv3 and the program Pv1 corresponding to the execution module M1 being executed by the PLC 10, and compiles the difference.
  • an execution module M3 corresponding to the difference program Pv3 is created. That is, since the compile flag 23 of the program Pv2 is not compiled here, the programming support unit 31 uses the sum of the difference between the program Pv3 and the program Pv2 and the difference between the program Pv2 and the program Pv1 to execute the module M3.
  • the programming support unit 31 of the programming support device 30 transmits the created execution module M3 to the PLC 10 and writes it in the PLC 10 (step S160).
  • the PLC 10 is operating using the execution module M1 corresponding to the program Pv2 before editing. Even in this case, the PLC 10 writes the execution module M3 during execution by applying the differential execution module M3. Since the PLC 10 loops the execution module M1, the difference execution module M3 is applied from the head of the next loop.
  • the programming support unit 31 of the programming support device 30 transmits the created program Pv3 and the created execution module M3 to the management device 20 (step S170).
  • the programming support unit 31 transmits the program Pv3 and the execution module M3 to the management device 20 when writing the execution module M3 into the PLC 10.
  • the version management unit 21 of the management apparatus 20 stores the program Pv3 from the programming support unit 31 in the storage unit 29 as the latest version program.
  • the version management unit 21 of the management device 20 stores the execution module M3 from the programming support unit 31 in the storage unit 29 as the latest execution module M3.
  • step S180 the version flag of the program Pv3 is changed to compiled (step S180).
  • the processing in steps S170 and S180 is processing for preventing a divergence between the program Pv3 stored in the management apparatus 20 and the program Pv3 corresponding to the execution module M3 written in the PLC 10.
  • the execution module Mx being executed by the PLC 10 and the execution module Mx being managed by the management apparatus 20 are the same, so that the process of step S155 may be omitted, but the same In order to confirm the property, it is preferable to execute the process of step S155.
  • FIG. 6 is a diagram for explaining information stored in the management apparatus according to the embodiment after the process of FIG. 5 is executed.
  • the version management unit 21 of the management apparatus 20 stores the program Pv3 in the storage unit 29.
  • the version management unit 21 changes the file stored with the file name of the program Pv2 to the contents of the program Pv3. Therefore, in the storage unit 29, the contents of the program Pv2 are changed to the contents of the program Pv3 while maintaining the file name.
  • the program Pv2 may be stored in an area different from the area where the program Pv3 is stored in the storage unit 29.
  • the version management unit 21 may store the difference between the program Pv2 and the program Pv3 in the storage unit 29 instead of the program Pv3.
  • the version management unit 21 rewrites the compilation flag 23 of the program Pv3 from uncompiled to compiled. Also, the version management unit 21 stores the execution module M3 in the storage unit 29. Specifically, the version management unit 21 changes the file stored with the file name of the execution module M1 to the contents of the execution module M3. Therefore, in the storage unit 29, the contents of the execution module M1 are changed to the contents of the execution module M3 while maintaining the file name. As a result, the storage unit 29 stores the project data 22 including the compile flag 23 indicating completion of compilation, the program Pv3, and the execution module M3.
  • the version management unit 21 registers information for identifying the program Pv3 and a version number indicating the version of the program Pv3 in the version information 25. This version number is specified by the user. For example, when “ver.3” is designated as the version of the program Pv3, the version management unit 21 associates information for identifying the third version of the program Pv3 with “ver.3” indicating the third version. And registered in the version information 25.
  • the program Pv3 is created from the program Pv1.
  • the program Pv1 is a first version program
  • the program Pv3 is a second version program.
  • the execution module M1 is a first version execution module
  • the execution module M3 is a second version execution module.
  • the programming support unit 31 transmits the execution module M3 to the PLC 10
  • the programming module 31 transmits the execution module M3 and the edited program Pv3 to the management apparatus 20.
  • the version management unit 21 of the management device 20 stores the difference execution module M3 and the edited program Pv3 in the storage unit 29, and further compiles the compile flag 23 corresponding to the edited program Pv3. Set to.
  • the program management system 1 can match the execution module Mx in the PLC 10 with the execution module Mx acquired from the management device 20. Moreover, since the programming support apparatus 30 has transmitted the execution module M1 to the management apparatus 20, when creating the execution module M3, the execution module M1 can be acquired from the management apparatus 20 instead of from the PLC 10. Since the management device 20 has a higher processing capability and faster communication speed than the PLC 10, the programming support device 30 acquires the execution module M1 from the management device 20 rather than acquiring the execution module M1 from the PLC 10. The execution module M1 can be acquired.
  • the compile flag 23 may be set by the programming support unit 31.
  • the programming support unit 31 transmits the set compile flag 23 to the management device 20.
  • the management apparatus 20 stores the compile flag 23 sent from the programming support unit 31.
  • FIG. 7 is a diagram illustrating a hardware configuration that implements the programming support apparatus according to the embodiment.
  • the programming support device 30 is realized by hardware 100 including a display device 101, an input device 102, a processor 103, a memory 104, and a communication device 105.
  • the display device 101 is a device that displays information, and is exemplified by a liquid crystal display, but is not limited thereto.
  • the input device 102 is a device for inputting various types of information including characters to the programming support unit 31, and examples thereof include a keyboard, a mouse, a pointing device, and a touch panel, but are not limited thereto.
  • the input device 102 is used when receiving various operations by the user. That is, the input device 102 is used when the programming support unit 31 receives an instruction from the user.
  • the communication device 105 performs communication with the management device 20 and with the PLC 10.
  • the communication device 105 receives various data such as the compile flag 23, the program P, and the execution module Mx from the management device 20, and transmits various data such as the program P and the execution module Mx created by the programming support unit 31 to the management device 20.
  • the communication device 105 transmits the execution module Mx created by the programming support unit 31 to the PLC 10 and receives binary data of the execution module Mx stored in the PLC 10 from the PLC 10.
  • the function of the programming support unit 31 included in the programming support device 30 is realized by the processor 103 and the memory 104.
  • the processor 103 is also referred to as a CPU (Central Processing Unit), a processing device, an arithmetic device, a microprocessor, a microcomputer, or a DSP (Digital Signal Processor).
  • the storage unit 39 is realized by the memory 104.
  • the memory 104 includes a RAM (Random Access Memory), a ROM (Read Only Memory), and the like.
  • the function of the programming support unit 31 is realized by software, firmware, or a combination of software and firmware.
  • Software and firmware are described as programs and stored in the memory 104.
  • the processor 103 implements the function of the programming support unit 31 by reading and executing the program stored in the memory 104. This program can be said to cause a computer to execute the procedure executed by the programming support unit 31.
  • the management device 20 can also be realized by the hardware 100 having the same configuration as the programming support device 30.
  • the program management system 1 manages the execution module Mx, even when a plurality of users edit the program P at the time of program development, it is easy to write to the PLC 10 during execution. Can be realized.
  • the execution module Mx managed by the management device 20 is always the same as the execution module Mx at the time of writing to the PLC 10, so that the program management system 1 performs the in-execution writing while performing version management of the execution module Mx. Is possible.
  • the program management system 1 may have a plurality of PLCs 10. In this case, the management device 20 manages the execution module Mx for each PLC 10.
  • the management apparatus 20 can write the common execution module Mx to the plurality of PLCs 10 by managing the common execution module Mx for the plurality of PLCs 10.
  • the management apparatus 20 stores a program Pv2, an execution module M1, and a compile flag 23 indicating uncompiled.
  • the management device 20 stores the program Pv3, the execution module M3, and the compile flag 23 set to be compiled.
  • the management apparatus 20 can store the latest program and can manage whether or not the latest program has been compiled. As a result, when the programming support device 30 reads, edits, and compiles the program stored in the management device 20, writing during execution to the PLC 10 is less likely to be prohibited. Further, an operation in which the execution module M2 created by the programming support device 30 is not reflected on the PLC 10 is also possible. Therefore, the program can be developed efficiently.
  • the configuration described in the above embodiment shows an example of the contents of the present invention, and can be combined with another known technique, and can be combined with other configurations without departing from the gist of the present invention. It is also possible to omit or change the part.

Abstract

This program management system comprises: a programming assistance device that edits a program Pv2 to create a program Pv3, and creates, by means of compilation, an execution module M3 corresponding to a difference from the program Pv2; and a management device that manages an execution module that is being executed in a control device, a program of a latest version, and compilation information indicating whether the program of the latest version has been compiled. If the execution module M3 is to be written to a PLC that is executing an execution module M1, the management device manages the program Pv3, information specific to the execution module M3, and a compilation flag indicating that the program Pv3 has been compiled. If the execution module M3 is not to be written to the PLC, the management device manages the program Pv3, information specific to the execution module M1, and a compilation flag indicating that the program Pv3 has not been compiled.

Description

プログラム管理システム、プログラミング支援装置、プログラム管理方法、およびプログラミング支援プログラムProgram management system, programming support apparatus, program management method, and programming support program
 本発明は、プログラムを管理するプログラム管理システム、プログラミング支援装置、プログラム管理方法、およびプログラミング支援プログラムに関する。 The present invention relates to a program management system, a programming support apparatus, a program management method, and a programming support program for managing programs.
 制御装置の一例であるPLC(Programmable Logic Controller:プログラマブルロジックコントローラ)は、制御用のプログラムがコンパイルされることによって作成された実行モジュールを用いて動作する。この制御用のプログラムは、ユーザによって編集され、新しいバージョンのプログラムとなる場合がある。この場合において、新しいバージョンのプログラムと古いバージョンのプログラムとの差分がコンパイルされることによって新しいバージョンの実行モジュールが作成され、古いバージョンの実行モジュールを用いて動作しているPLCに対し、新しいバージョンの実行モジュールが書き込まれる場合がある。このような、動作中のPLCに対して実行モジュールの更新を行う処理は、実行中書き込みまたはラン(RUN)中書き込みと呼ばれる。 A PLC (Programmable Logic Controller), which is an example of a control device, operates using an execution module created by compiling a control program. This control program may be edited by the user to become a new version of the program. In this case, a new version of the execution module is created by compiling the difference between the new version of the program and the old version of the program, and the new version of the PLC operating with the old version of the execution module is created. An execution module may be written. Such a process of updating the execution module with respect to the operating PLC is referred to as “running execution” or “run (RUN) writing”.
 特許文献1に記載のプログラマブルコントローラシステムは、プログラムから作成された実行モジュールに識別情報を対応付けている。このプログラマブルコントローラシステムは、実行中書き込みを行う前に、PLCへのダウンロード対象の実行モジュールが、PLCで実行中のマスタ版から作成された派生版であるか否かを識別情報に基づいて判断し、派生版である場合にダウンロードを許可している。 The programmable controller system described in Patent Document 1 associates identification information with an execution module created from a program. This programmable controller system determines, based on the identification information, whether or not the execution module to be downloaded to the PLC is a derivative version created from the master version being executed in the PLC before performing the writing during execution. If it is a derivative version, download is permitted.
特開2013-168031号公報JP 2013-168031 A
 しかしながら、上記特許文献1に記載の技術を含め一般的に、支援装置が、プログラムを編集しコンパイルして実行モジュールを作成すると、作成した実行モジュールをPLCに書き込んでいない場合であっても、作成した実行モジュールの元のプログラムを、最新のプログラムとして管理していた。 However, in general, including the technology described in Patent Document 1, when the support device edits and compiles a program to create an execution module, the created execution module is created even if it is not written in the PLC. The original program of the executed execution module was managed as the latest program.
 最新として管理されているプログラムに対して編集が行われコンパイルが行われると、このコンパイルで作成された実行モジュールとPLCで実行中の実行モジュールとの間で整合が取れなくなるため、PLCへの実行中書き込みを行っていない。 If the program managed as the latest is edited and compiled, the execution module created by this compilation and the execution module being executed in the PLC cannot be matched. Medium writing is not performed.
 この場合、PLCに書き込まなかった実行モジュールを特定し、上記コンパイルで作成された実行モジュールと併せて、PLCへの実行中書き込みを行う必要がある。あるいは、PLCで実行中の実行モジュールのコンパイル元のプログラムを特定し、当該プログラムとの差分の実行モジュールを作成し直した上で、PLCへの実行中書き込みを行う必要がある。このような実行モジュールの特定またはコンパイルの再実行が必要になるため、プログラムの開発効率が悪化するといった問題があった。 In this case, it is necessary to specify an execution module that has not been written to the PLC, and write to the PLC during execution together with the execution module created by the above compilation. Alternatively, it is necessary to specify a compilation source program of an execution module being executed by the PLC, re-create an execution module that is different from the program, and then write the execution to the PLC. Since it is necessary to specify such an execution module or re-execute compilation, there is a problem that the development efficiency of the program deteriorates.
 本発明は、上記に鑑みてなされたものであって、効率良くプログラムを開発することができるプログラム管理システムを得ることを目的とする。 The present invention has been made in view of the above, and an object thereof is to obtain a program management system capable of efficiently developing a program.
 上述した課題を解決し、目的を達成するために、本発明のプログラム管理システムは、第1バージョンのプログラムを用いたコンパイルが行われることによって作成された第1バージョンの実行モジュールで被制御機器を制御する制御装置に接続されるとともに、第1バージョンのプログラムを編集して第2バージョンのプログラムを作成し、コンパイルによって、第1バージョンのプログラムと第2バージョンのプログラムとの差分に対応する第2バージョンの実行モジュールを作成するプログラミング支援装置を備える。また、本発明のプログラム管理システムは、制御装置で実行中の実行モジュールと、最新バージョンのプログラムと、最新バージョンのプログラムがコンパイル済みであるか否かを示すコンパイル情報と、を管理する管理装置を備える。プログラミング支援装置は、第1バージョンの実行モジュールを実行中の制御装置に対して第2バージョンの実行モジュールを書き込む場合には、管理装置に第2バージョンのプログラムと、第2バージョンの実行モジュールに固有の情報とを送信し、第1バージョンの実行モジュールを実行中の制御装置に対して第2バージョンの実行モジュールを書き込まない場合には、管理装置に第2バージョンのプログラムを送信する。管理装置は、第2バージョンのプログラムおよび第2バージョンの実行モジュールに固有の情報を受信した場合には、第2バージョンのプログラムを最新バージョンのプログラムとして管理し、第2バージョンの実行モジュールを制御装置で実行中の実行モジュールとして管理し、コンパイル情報をコンパイル済みであることを示す情報に設定する。管理装置は、第2バージョンの実行モジュールに固有の情報を受信せず第2バージョンのプログラムを受信した場合には、第2バージョンのプログラムを最新バージョンのプログラムとして管理し、第1バージョンの実行モジュールを制御装置で実行中の実行モジュールとして管理し、コンパイル情報をコンパイル済みでないことを示す情報に設定する。 In order to solve the above-described problems and achieve the object, the program management system of the present invention uses a first version execution module created by compiling using a first version program to control a controlled device. A second version corresponding to a difference between the first version program and the second version program by editing the first version program to create a second version program and compiling the second version program; A programming support device for creating a version execution module is provided. The program management system of the present invention includes a management device that manages an execution module being executed by the control device, the latest version of the program, and compile information indicating whether or not the latest version of the program has been compiled. Prepare. When writing the second version of the execution module to the control device that is executing the first version of the execution module, the programming support apparatus is specific to the second version of the program and the second version of the execution module. When the second version of the execution module is not written to the control device that is executing the first version of the execution module, the second version of the program is transmitted to the management device. When the management apparatus receives information specific to the second version program and the second version execution module, the management apparatus manages the second version program as the latest version program, and controls the second version execution module to the control apparatus. Is managed as an execution module being executed, and compile information is set to information indicating that it has been compiled. When the management apparatus receives the second version of the program without receiving information specific to the second version of the execution module, the management apparatus manages the second version of the program as the latest version of the program, and the first version of the execution module Is managed as an execution module being executed by the control device, and the compile information is set to information indicating that it has not been compiled.
 本発明にかかるプログラム管理システムは、効率良くプログラムを開発することができるという効果を奏する。 The program management system according to the present invention has an effect that a program can be efficiently developed.
本発明の実施の形態にかかるプログラム管理システムの構成を示す図The figure which shows the structure of the program management system concerning embodiment of this invention 実施の形態にかかる管理装置がプロジェクトデータの管理を開始するタイミングで記憶している情報を説明するための図The figure for demonstrating the information memorize | stored in the timing which the management apparatus concerning embodiment starts management of project data 実施の形態にかかるプログラム管理システムにおいて、プログラムが編集されるもののPLCには書き込まれない場合の処理手順を示すフローチャートThe flowchart which shows the process sequence in the program management system concerning embodiment, when a program is edited but is not written in PLC 図3の処理が実行された後に実施の形態にかかる管理装置が記憶している情報を説明するための図The figure for demonstrating the information which the management apparatus concerning Embodiment memorize | stores after the process of FIG. 3 is performed 実施の形態にかかるプログラム管理システムにおいて、プログラムが編集されてPLCに書き込まれる場合の処理手順を示すフローチャートThe flowchart which shows the process sequence in case the program is edited and written in PLC in the program management system concerning embodiment 図5の処理が実行された後に実施の形態にかかる管理装置が記憶している情報を説明するための図The figure for demonstrating the information which the management apparatus concerning Embodiment memorize | stores after the process of FIG. 5 is performed 実施の形態にかかるプログラミング支援装置を実現するハードウェア構成を示す図The figure which shows the hardware constitutions which implement | achieve the programming assistance apparatus concerning embodiment
 以下に、本発明の実施の形態にかかるプログラム管理システム、プログラミング支援装置、プログラム管理方法、およびプログラミング支援プログラムを図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。 Hereinafter, a program management system, a programming support apparatus, a program management method, and a programming support program according to an embodiment of the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.
実施の形態.
 図1は、本発明の実施の形態にかかるプログラム管理システムの構成を示す図である。プログラム管理システム1は、プログラムPをコンパイルすることによって作成した実行モジュールMxを管理するとともに、新たに作成された実行モジュールMxを用いてPLC10に実行中書き込みを行うシステムである。プログラム管理システム1は、PLC10で実行中の実行モジュールMxのバージョンと、これから実行中書き込みを実施しようとした際に読み出してきた実行モジュールMxのバージョンとを一致させるよう、実行モジュールMxを管理する。
Embodiment.
FIG. 1 is a diagram showing a configuration of a program management system according to an embodiment of the present invention. The program management system 1 is a system that manages the execution module Mx created by compiling the program P, and writes the PLC 10 during execution using the newly created execution module Mx. The program management system 1 manages the execution module Mx so that the version of the execution module Mx that is being executed by the PLC 10 matches the version of the execution module Mx that is read when the execution-in-execution write is about to be performed.
 プログラムPは、複数のユーザによって編集可能であり、ユーザによって編集されると、新しいバージョンのプログラムPとなる。新しいバージョンのプログラムPがコンパイルされると新しいバージョンの実行モジュールMxが生成される。プログラムPの例は、後述するプログラムPv1~Pv3であり、実行モジュールMxの例は、後述する実行モジュールM1~M3である。 The program P can be edited by a plurality of users. When edited by the user, the program P becomes a new version of the program P. When the new version of the program P is compiled, a new version of the execution module Mx is generated. Examples of the program P are programs Pv1 to Pv3 described later, and examples of the execution module Mx are execution modules M1 to M3 described later.
 実行中書き込みは、PLC10の動作を停止しないでPLC10の実行モジュールを更新する処理である。実行中書き込みでは、特定の実行モジュールを用いて動作しているPLC10に対し、新しいバージョンの実行モジュールが書き込まれる。実行中書き込みの際には、PLC10に前回書き込み時との差分となる実行モジュールがPLC10に書き込まれる。本実施の形態では、プログラム管理システム1が、PLC10で実行中の実行モジュールMxのバージョンを管理し、PLC10で実行中の実行モジュールMxに対応する適切な実行モジュールMxにのみ、実行中書き込みを許可する。 “In-execution writing” is a process of updating the execution module of the PLC 10 without stopping the operation of the PLC 10. In the in-execution writing, a new version of the execution module is written to the PLC 10 operating using a specific execution module. At the time of writing during execution, an execution module that is a difference from the previous writing is written into the PLC 10. In the present embodiment, the program management system 1 manages the version of the execution module Mx being executed by the PLC 10, and permits execution writing only to an appropriate execution module Mx corresponding to the execution module Mx being executed by the PLC 10. To do.
 プログラム管理システム1は、産業用機械を制御する制御装置の一例であるPLC10と、管理装置20と、プログラミング支援装置30とを備えている。 The program management system 1 includes a PLC 10, which is an example of a control device that controls an industrial machine, a management device 20, and a programming support device 30.
 PLC10は、実行モジュールMxを格納しており、この実行モジュールMxを用いて産業用機械といった被制御機器を制御する。プログラミング支援装置30は、産業用機械を制御するためのプログラムPをコンパイルすることによってプログラムPから実行モジュールMxを作成するコンピュータである。プログラム管理装置である管理装置20は、プログラムPのバージョン管理および実行モジュールMxのバージョン管理を行うコンピュータである。 The PLC 10 stores an execution module Mx, and controls the controlled device such as an industrial machine using the execution module Mx. The programming support device 30 is a computer that creates an execution module Mx from the program P by compiling the program P for controlling the industrial machine. The management device 20 that is a program management device is a computer that performs version management of the program P and version management of the execution module Mx.
 管理装置20には、1または複数のプログラミング支援装置30が接続されている。また、1または複数のプログラミング支援装置30は、それぞれPLC10に接続されている。管理装置20の一例は、サーバであり、プログラミング支援装置30の一例はクライアント装置である。 The management device 20 is connected to one or more programming support devices 30. One or more programming support devices 30 are each connected to the PLC 10. An example of the management device 20 is a server, and an example of the programming support device 30 is a client device.
 プログラミング支援装置30は、プログラミング支援ツールであるプログラミング支援部31と、記憶部39とを備えている。プログラミング支援部31は、プログラムPの作成を支援する機能を有している。具体的には、プログラミング支援部31は、プログラムPを作成する機能と、プログラムPを編集する機能と、プログラムPをコンパイルする機能とを備えている。また、プログラミング支援部31は、プログラムPおよび実行モジュールMxを、外部装置である管理装置20に送信する機能と、実行モジュールMxをPLC10に書き込む機能と、管理装置20で管理されている、コンパイルフラグ23、プログラムPおよび実行モジュールMxを読み出す機能とを備えている。 The programming support device 30 includes a programming support unit 31 that is a programming support tool, and a storage unit 39. The programming support unit 31 has a function of supporting creation of the program P. Specifically, the programming support unit 31 has a function of creating the program P, a function of editing the program P, and a function of compiling the program P. In addition, the programming support unit 31 has a function of transmitting the program P and the execution module Mx to the management device 20 that is an external device, a function of writing the execution module Mx into the PLC 10, and a compile flag managed by the management device 20. 23, and a function of reading the program P and the execution module Mx.
 プログラムPを作成する機能の具体例は、ユーザからの指示に従ってプログラムPを作成する機能であり、プログラムPを編集する機能の具体例は、ユーザからの指示に従ってプログラムPを編集する機能である。プログラムPをコンパイルする機能は、プログラムPをコンパイルすることによって、プログラムPから実行モジュールMxを作成する機能である。プログラムPをコンパイルする機能であるコンパイラは、ソースコードであるプログラムPを、機械語である実行モジュールMxに変換する。なお、プログラミング支援部31は、複数のプログラムPに対して実行モジュールMxを作成してもよいし、プログラムP毎に実行モジュールMxを作成してもよい。 A specific example of the function of creating the program P is a function of creating the program P according to an instruction from the user, and a specific example of the function of editing the program P is a function of editing the program P according to the instruction from the user. The function for compiling the program P is a function for creating the execution module Mx from the program P by compiling the program P. A compiler, which is a function for compiling the program P, converts the program P, which is a source code, into an execution module Mx, which is a machine language. The programming support unit 31 may create an execution module Mx for a plurality of programs P, or may create an execution module Mx for each program P.
 プログラミング支援部31が管理装置20に送信するプログラムPおよび実行モジュールMxは、プログラミング支援部31が作成または編集したものである。また、プログラミング支援部31がPLC10に書き込む実行モジュールMxは、プログラミング支援部31が作成または編集したものである。 The program P and the execution module Mx transmitted from the programming support unit 31 to the management device 20 are created or edited by the programming support unit 31. The execution module Mx written to the PLC 10 by the programming support unit 31 is created or edited by the programming support unit 31.
 また、プログラミング支援部31が管理装置20から読み出すプログラムPおよび実行モジュールMxは、プログラミング支援部31で、以前に作成または編集したものである。なお、プログラミング支援部31が管理装置20から読み出すプログラムPおよび実行モジュールMxは、他のプログラミング支援装置30で作成または編集されたものであってもよい。 In addition, the program P and the execution module Mx that the programming support unit 31 reads from the management device 20 are previously created or edited by the programming support unit 31. The program P and the execution module Mx that the programming support unit 31 reads from the management device 20 may be created or edited by another programming support device 30.
 記憶部39は、プログラムPおよび実行モジュールMxを管理するためのデータであるプロジェクトデータ22を記憶する。このプロジェクトデータ22は、プログラミング支援部31がプロジェクトデータ22を編集する際に、プログラミング支援部31が管理装置20から読み出したものである。プロジェクトデータ22内には、コンパイルフラグ23と、プログラムPと、実行モジュールMxとが含まれている。 The storage unit 39 stores project data 22 that is data for managing the program P and the execution module Mx. The project data 22 is read by the programming support unit 31 from the management apparatus 20 when the programming support unit 31 edits the project data 22. The project data 22 includes a compile flag 23, a program P, and an execution module Mx.
 プログラムPは、編集されて新しいバージョンのプログラムPとなった後にコンパイルされると、実行モジュールMxも新しいバージョンとなる。したがって、プログラミング支援部31が、新しいバージョンのプログラムPをコンパイルして新しいバージョンの実行モジュールMxを作成した場合には、新しいバージョンの実行モジュールMxが記憶部39で記憶される。このように、記憶部39は、プログラミング支援部31がプロジェクトデータ22を編集すると、編集後のプロジェクトデータ22を記憶する。 When the program P is compiled and compiled after the program P becomes a new version, the execution module Mx also becomes a new version. Therefore, when the programming support unit 31 compiles a new version of the program P and creates a new version of the execution module Mx, the new version of the execution module Mx is stored in the storage unit 39. Thus, when the programming support unit 31 edits the project data 22, the storage unit 39 stores the edited project data 22.
 コンパイル情報であるコンパイルフラグ23は、プロジェクトデータ22に含まれるプログラムPがコンパイル済みであるか否かを示すフラグである。プロジェクトデータ22に複数のプログラムPが含まれる場合、コンパイルフラグ23では、コンパイル済みであるか否かの情報がプログラム毎に示される。 The compile flag 23 which is compile information is a flag indicating whether or not the program P included in the project data 22 has been compiled. When the project data 22 includes a plurality of programs P, the compile flag 23 indicates information about whether or not the program has been compiled for each program.
 プログラミング支援装置30は、ユーザからの指示に従ってプログラムPを編集してこのプログラムPを保存しておく場合と、ユーザからの指示に従って編集したプログラムPをコンパイルしてPLC10に実行中書き込みをする場合とがある。プログラミング支援装置30は、ユーザからの指示に従って編集したプログラムPをコンパイルしてPLC10に実行中書き込みをする場合、編集したプログラムPと、PLC10で実行中の実行モジュールMxに対応するプログラムPとの差分を算出し、差分に対応する実行モジュールを作成する。差分に対応する実行モジュールの例は、後述する実行モジュールM3である。プログラミング支援装置30は、差分の実行モジュールM3を用いて、PLC10に実行中書き込みを行い、さらに差分の実行モジュールM3を管理装置20に保存させる。なお、プログラミング支援装置30は、編集したプログラムPの実行モジュールと、PLC10で実行中の実行モジュールMxとの差分に対応する実行モジュールを作成してもよい。この場合も、差分に対応する実行モジュールの例は、後述する実行モジュールM3である。 The programming support apparatus 30 edits the program P in accordance with an instruction from the user and saves the program P, and compiles the edited program P in accordance with the instruction from the user and writes it to the PLC 10 during execution. There is. When the programming support device 30 compiles the edited program P according to an instruction from the user and writes the program P during execution to the PLC 10, the difference between the edited program P and the program P corresponding to the execution module Mx being executed in the PLC 10 And an execution module corresponding to the difference is created. An example of the execution module corresponding to the difference is an execution module M3 described later. The programming support apparatus 30 writes the execution in progress to the PLC 10 using the differential execution module M3, and further stores the differential execution module M3 in the management apparatus 20. Note that the programming support apparatus 30 may create an execution module corresponding to the difference between the execution module of the edited program P and the execution module Mx being executed by the PLC 10. Also in this case, an example of an execution module corresponding to the difference is an execution module M3 described later.
 編集したプログラムPとPLC10で実行中の実行モジュールMxに対応するプログラムPとの差分は、プログラムPへの編集で追加された特定の行などである。なお、プロジェクトデータ22内のプログラムPが複数のプログラムである場合、編集したプログラムPとPLC10で実行中の実行モジュールMxに対応するプログラムPとの差分は、複数のプログラムのうちの特定のプログラムの全体であってもよい。 The difference between the edited program P and the program P corresponding to the execution module Mx being executed by the PLC 10 is a specific line added by editing the program P. When the program P in the project data 22 is a plurality of programs, the difference between the edited program P and the program P corresponding to the execution module Mx being executed by the PLC 10 is the difference between a specific program among the plurality of programs. The whole may be sufficient.
 なお、プログラミング支援ツールであるプログラミング支援部31は、エンジニアリングツールの一部であってもよい。エンジニアリングツールは、プログラミング支援装置30が、ユーザからの指示に従って、PLC10への各種設定を行うためのアプリケーションソフトウェアである。 Note that the programming support unit 31 that is a programming support tool may be a part of an engineering tool. The engineering tool is application software for the programming support device 30 to make various settings to the PLC 10 in accordance with instructions from the user.
 管理装置20は、バージョン管理ツールであるバージョン管理部21と、記憶部29とを備えている。バージョン管理部21は、プログラミング支援装置30から送られてくるプロジェクトデータ22を管理する。具体的には、バージョン管理部21は、プログラミング支援装置30から送られてくる実行モジュールMxおよびプログラムPを管理する。また、バージョン管理部21は、コンパイルフラグ23およびバージョン情報25を管理する。 The management device 20 includes a version management unit 21 that is a version management tool, and a storage unit 29. The version management unit 21 manages the project data 22 sent from the programming support device 30. Specifically, the version management unit 21 manages the execution module Mx and the program P sent from the programming support device 30. The version management unit 21 manages the compile flag 23 and the version information 25.
 バージョン管理部21は、プログラミング支援装置30からプロジェクトデータ22を受信すると、このプロジェクトデータ22を記憶部29に記憶させる。したがって、プログラムPがプログラミング支援装置30で編集されて新しいバージョンのプログラムPとなった場合には、新しいバージョンのプログラムPが記憶部29で記憶される。 When the version management unit 21 receives the project data 22 from the programming support device 30, the version management unit 21 stores the project data 22 in the storage unit 29. Therefore, when the program P is edited by the programming support device 30 to become a new version of the program P, the new version of the program P is stored in the storage unit 29.
 記憶部29は、バージョン管理部21からの指示に従ってプロジェクトデータ22を記憶する。記憶部29で記憶されるプロジェクトデータ22も、記憶部39で記憶されるプロジェクトデータ22と同様にコンパイルフラグ23、プログラムPおよび実行モジュールMxを含んでいる。また、記憶部29は、バージョン情報25を記憶する。 The storage unit 29 stores the project data 22 in accordance with instructions from the version management unit 21. Similarly to the project data 22 stored in the storage unit 39, the project data 22 stored in the storage unit 29 includes a compile flag 23, a program P, and an execution module Mx. The storage unit 29 stores version information 25.
 なお、記憶部29は、複数のプロジェクトデータ22を記憶してもよい。また、各プロジェクトデータ22には、複数のプログラムPが含まれていてもよい。バージョン管理部21は、プログラミング支援装置30内に配置されてもよいし、プログラミング支援装置30および管理装置20以外に配置されてもよい。 The storage unit 29 may store a plurality of project data 22. Each project data 22 may include a plurality of programs P. The version management unit 21 may be disposed in the programming support device 30 or may be disposed other than the programming support device 30 and the management device 20.
 バージョン管理部21は、プログラムPがプログラミング支援装置30で編集されて新しいバージョンとなった際にコンパイルフラグ23を更新する。バージョン管理部21は、プログラムPが編集された後にコンパイルされなければ、コンパイルフラグ23を未コンパイルに設定し、プログラムPが編集された後にコンパイルされると、コンパイルフラグ23をコンパイル済みに設定する。本実施の形態では、後述するように、実行モジュールMxがPLC10に書き込まれる場合にはコンパイルフラグ23がコンパイル済みに設定されるので、コンパイルフラグ23は、PLC10に実行モジュールMxが書き込まれたか否かを示すフラグであるともいえる。 The version management unit 21 updates the compile flag 23 when the program P is edited by the programming support device 30 to become a new version. If the program P is not compiled after being edited, the version management unit 21 sets the compilation flag 23 to be uncompiled, and if the program P is compiled after being edited, the version management unit 21 sets the compilation flag 23 to be compiled. In the present embodiment, as will be described later, when the execution module Mx is written in the PLC 10, the compile flag 23 is set to be compiled. Therefore, the compile flag 23 indicates whether or not the execution module Mx is written in the PLC 10. It can be said that this is a flag indicating.
 また、バージョン管理部21は、プログラミング支援装置30から送られてくるプログラムPと、このプログラムPのバージョンとに基づいて、バージョン情報25を編集する。バージョン情報25は、バージョン管理部21によって管理される情報である。バージョン情報25では、プログラムPと、プログラムPのバージョンとが対応付けされている。例えば、プログラムPの一例であるプログラムPv1が第1バージョンであり、プログラムPの一例であるプログラムPv2が第2バージョンである場合、バージョン情報25では、プログラムPv1と第1バージョンを示す情報とが対応付けされ、プログラムPv2と第2バージョンを示す情報とが対応付けされている。 Further, the version management unit 21 edits the version information 25 based on the program P sent from the programming support device 30 and the version of the program P. The version information 25 is information managed by the version management unit 21. In the version information 25, the program P and the version of the program P are associated with each other. For example, when the program Pv1 which is an example of the program P is the first version and the program Pv2 which is an example of the program P is the second version, the version information 25 corresponds to the information indicating the program Pv1 and the first version. The program Pv2 is associated with information indicating the second version.
 バージョン管理部21は、新しいバージョンのプログラムPがプログラミング支援装置30から送られてくると、この新しいバージョンとプログラムPとを対応付けしてバージョン情報25に登録する。 When the new version of the program P is sent from the programming support apparatus 30, the version management unit 21 associates the new version with the program P and registers it in the version information 25.
 ここで、プログラムPが編集された場合の、実行モジュールMxの管理手順および管理装置20で管理される情報について説明する。図2は、実施の形態にかかる管理装置がプロジェクトデータの管理を開始するタイミングで記憶している情報を説明するための図である。なお、図2では、プログラムPの一例であるプログラムPv1と、実行モジュールMxの一例である実行モジュールM1が作成された場合について説明する。 Here, the management procedure of the execution module Mx and the information managed by the management device 20 when the program P is edited will be described. FIG. 2 is a diagram for explaining information stored at a timing when the management apparatus according to the embodiment starts managing the project data. FIG. 2 illustrates a case where a program Pv1 that is an example of the program P and an execution module M1 that is an example of the execution module Mx are created.
 プログラミング支援部31は、第1バージョンのプログラムPv1を作成すると、このプログラムPv1をコンパイルすることによって第1バージョンの実行モジュールである実行モジュールM1を作成する。そして、プログラミング支援部31は、作成した実行モジュールM1をPLC10に送信し、PLC10に書き込む。このとき、プログラミング支援部31は、作成したプログラムPv1および実行モジュールM1を含んだプロジェクトデータ22を作成し、作成したプロジェクトデータ22を管理装置20に送信する。これにより、PLC10は、実行モジュールM1を用いて産業用機械の制御を開始し、管理装置20は、プロジェクトデータ22を記憶部29で記憶する。このとき、管理装置20のバージョン管理部21は、プログラムPv1とともに実行モジュールM1を受信しているので、プログラムPv1に対応するコンパイルフラグ23をコンパイル済みに設定する。 When the programming support unit 31 creates the first version of the program Pv1, the programming support unit 31 compiles the program Pv1 to create an execution module M1 that is an execution module of the first version. Then, the programming support unit 31 transmits the created execution module M1 to the PLC 10 and writes it in the PLC 10. At this time, the programming support unit 31 creates project data 22 including the created program Pv1 and the execution module M1, and transmits the created project data 22 to the management apparatus 20. Thereby, PLC10 starts control of an industrial machine using the execution module M1, and the management apparatus 20 memorize | stores the project data 22 in the memory | storage part 29. FIG. At this time, the version management unit 21 of the management device 20 receives the execution module M1 together with the program Pv1, and therefore sets the compile flag 23 corresponding to the program Pv1 to be compiled.
 これにより、図2に示すように、記憶部29では、コンパイル済みに設定されたコンパイルフラグ23と、プログラムPv1と、実行モジュールM1と、を含んだプロジェクトデータ22が記憶される。この場合において、バージョン管理部21は、バージョン情報25に、プログラムPv1を識別する情報と、プログラムPv1のバージョンを示すバージョン番号とを登録する。このバージョン番号は、ユーザによって指定されるものである。バージョン管理部21は、例えば、プログラムPv1のバージョンに「ver.1」が指定された場合、第1バージョンのプログラムPv1を識別する情報と、第1バージョンであることを示す「ver.1」とを対応付けしてバージョン情報25に登録する。プログラムPv1を識別する情報の例は、プログラムPv1の名称である。 Thereby, as shown in FIG. 2, the storage unit 29 stores the project data 22 including the compile flag 23 set as compiled, the program Pv1, and the execution module M1. In this case, the version management unit 21 registers information identifying the program Pv1 and a version number indicating the version of the program Pv1 in the version information 25. This version number is specified by the user. For example, when “ver.1” is designated as the version of the program Pv1, the version management unit 21 includes information for identifying the first version of the program Pv1 and “ver.1” indicating the first version. Are registered in the version information 25 in association with each other. An example of information for identifying the program Pv1 is the name of the program Pv1.
 この後、ユーザが、プログラムPv1を編集したい場合がある。この場合、プログラミング支援部31は、ユーザからの指示に従って管理装置20からプログラムPv1を読み出し、記憶部39に記憶させる。そして、プログラミング支援部31は、ユーザからの指示に従ってプログラムPv1を編集する。この場合において、ユーザは、プログラムPv1を編集するだけで、PLC10には反映させない場合と、プログラムPv1を編集した後、プログラムPv1をPLC10に反映させたい場合とがある。 After this, the user may want to edit the program Pv1. In this case, the programming support unit 31 reads out the program Pv1 from the management device 20 in accordance with an instruction from the user and stores it in the storage unit 39. Then, the programming support unit 31 edits the program Pv1 in accordance with an instruction from the user. In this case, there are a case where the user only edits the program Pv1 and does not reflect it in the PLC 10, and a case where the user wants to reflect the program Pv1 in the PLC 10 after editing the program Pv1.
 ここで、第1のユーザと第2のユーザとによってプログラム編集が実行される場合について説明する。第1のユーザは、プログラムPv1を編集して後述のプログラムPv2を作成するだけで、プログラムPv2に対応する実行モジュールM2をPLC10には書き込まないものとする。その後、第2のユーザは、プログラムPv2を編集して後述のプログラムPv3を作成し、その後、プログラムPv3をコンパイルしてPLC10に反映させるものとする。このような、ユーザによる処理の手順について説明する。以下の説明では、第1バージョンのプログラムPv1から、第2バージョンのプログラムPv2が作成され、第2バージョンのプログラムPv2から第3バージョンのプログラムPv3が作成される場合について説明する。したがって、第1バージョンのプログラムPv1がコンパイルされると第1バージョンの実行モジュールM1となり、第2バージョンのプログラムPv2がコンパイルされると第2バージョンの実行モジュールM2(図示せず)となり、第3バージョンのプログラムPv3がコンパイルされると第3バージョンの実行モジュールM3となる。 Here, a case where program editing is executed by the first user and the second user will be described. It is assumed that the first user only edits the program Pv1 and creates a program Pv2 described later, and does not write the execution module M2 corresponding to the program Pv2 in the PLC 10. Thereafter, the second user edits the program Pv2 to create a later-described program Pv3, and then compiles the program Pv3 and reflects it in the PLC 10. A procedure of such processing by the user will be described. In the following description, a case will be described in which the second version program Pv2 is created from the first version program Pv1, and the third version program Pv3 is created from the second version program Pv2. Therefore, when the first version of the program Pv1 is compiled, the first version of the execution module M1 is obtained, and when the second version of the program Pv2 is compiled, the second version of the execution module M2 (not shown) is obtained. When the program Pv3 is compiled, the third version of the execution module M3 is obtained.
 図3は、実施の形態にかかるプログラム管理システムにおいて、プログラムが編集されるもののPLCには書き込まれない場合の処理手順を示すフローチャートである。第1のユーザであるユーザAAがプログラムPv1を編集する場合、ユーザAAからの指示に従ってプログラミング支援装置30のプログラミング支援部31は、管理装置20からプログラムPv1、コンパイルフラグ23および実行モジュールM1を読み出して取得する(ステップS10)。このプログラムPv1、コンパイルフラグ23および実行モジュールM1は、記憶部39で記憶される。 FIG. 3 is a flowchart illustrating a processing procedure when the program is edited but not written to the PLC in the program management system according to the embodiment. When the user AA who is the first user edits the program Pv1, the programming support unit 31 of the programming support device 30 reads the program Pv1, the compile flag 23, and the execution module M1 from the management device 20 in accordance with an instruction from the user AA. Obtain (step S10). The program Pv1, the compile flag 23, and the execution module M1 are stored in the storage unit 39.
 この後、プログラミング支援装置30のプログラミング支援部31は、ユーザAAからの指示に従ってプログラムPv1を編集し、新しいバージョンのプログラムPv2を作成する(ステップS20)。プログラミング支援部31は、プログラムPv2をプログラムPv1と同じファイル名で作成し、バージョン番号を更新する。例えば、ユーザAAが、プログラムPv2のバージョンに「ver.2」を指定すると、プログラミング支援部31は、プログラムPv2と「ver.2」とを対応付ける。 Thereafter, the programming support unit 31 of the programming support device 30 edits the program Pv1 in accordance with an instruction from the user AA to create a new version of the program Pv2 (step S20). The programming support unit 31 creates the program Pv2 with the same file name as the program Pv1, and updates the version number. For example, when the user AA specifies “ver.2” as the version of the program Pv2, the programming support unit 31 associates the program Pv2 with “ver.2”.
 この後、プログラミング支援装置30のプログラミング支援部31は、管理装置20のバージョン管理部21に、「ver.2」に対応付けされたプログラムPv2を送信する(ステップS30)。このとき、プログラミング支援部31は、読み出したプログラムPv1に対応するプロジェクトデータ22を指定して、バージョン管理部21にプログラムPv2を送信する。 Thereafter, the programming support unit 31 of the programming support device 30 transmits the program Pv2 associated with “ver. 2” to the version management unit 21 of the management device 20 (step S30). At this time, the programming support unit 31 designates the project data 22 corresponding to the read program Pv1, and transmits the program Pv2 to the version management unit 21.
 これにより、管理装置20のバージョン管理部21は、指定されたプロジェクトデータ22にプログラムPv2を含める。すなわち、管理装置20の記憶部29が、プログラムPv2を記憶する。さらに、管理装置20では、プログラムPv2に対応する実行モジュールM2が送られてきていないので、管理装置20のバージョン管理部21が、プログラムPv2のコンパイルフラグ23を未コンパイルに変更する(ステップS40)。また、バージョン管理部21は、プログラムPv2を識別する情報と、プログラムPv2のバージョンを示す「ver.2」とを対応付けしてバージョン情報25に登録する。 Thereby, the version management unit 21 of the management apparatus 20 includes the program Pv2 in the designated project data 22. That is, the storage unit 29 of the management device 20 stores the program Pv2. Furthermore, since the execution module M2 corresponding to the program Pv2 has not been sent in the management device 20, the version management unit 21 of the management device 20 changes the compile flag 23 of the program Pv2 to uncompiled (step S40). Also, the version management unit 21 associates information for identifying the program Pv2 with “ver.2” indicating the version of the program Pv2, and registers the information in the version information 25.
 なお、プログラミング支援部31は、ユーザAAからの指示に従ってプログラムPv2をコンパイルし、これによりプログラムPv2に対応する実行モジュールM2を作成してもよい。この場合であっても、プログラミング支援部31は、ユーザAAから、PLC10への実行モジュールM2の書き込み指示が無かった場合には、実行モジュールM2をPLC10へも管理装置20へも送信しない。これにより、PLC10内の実行モジュールM1と管理装置20で管理している実行モジュールM1との同一性を維持できる。なお、実行中書き込みをしない場合には、ステップS10でコンパイルフラグ23および実行モジュールM1の取得を省略してもよい。 Note that the programming support unit 31 may compile the program Pv2 in accordance with an instruction from the user AA, thereby creating an execution module M2 corresponding to the program Pv2. Even in this case, the programming support unit 31 does not transmit the execution module M2 to the PLC 10 or the management apparatus 20 when there is no instruction for writing the execution module M2 to the PLC 10 from the user AA. Thereby, the identity of the execution module M1 in the PLC 10 and the execution module M1 managed by the management device 20 can be maintained. If writing during execution is not performed, the acquisition of the compile flag 23 and the execution module M1 may be omitted in step S10.
 図4は、図3の処理が実行された後に実施の形態にかかる管理装置が記憶している情報を説明するための図である。図3の処理が実行されることにより、管理装置20のバージョン管理部21は、プログラムPv2を記憶部29に記憶させる。具体的には、バージョン管理部21は、プログラムPv1のファイル名で記憶されていたファイルを、プログラムPv2の内容に変更する。したがって、記憶部29では、ファイル名を維持したままプログラムPv1の内容がプログラムPv2の内容に変更される。なお、プログラムPv1は、記憶部29内でプログラムPv2が保存される領域とは別の領域に保存しておいてもよい。この場合、バージョン管理部21は、プログラムPv2の代わりに、プログラムPv1とプログラムPv2との差分を記憶部29に記憶させてもよい。 FIG. 4 is a diagram for explaining information stored in the management apparatus according to the embodiment after the process of FIG. 3 is executed. 3 is executed, the version management unit 21 of the management device 20 stores the program Pv2 in the storage unit 29. Specifically, the version management unit 21 changes the file stored with the file name of the program Pv1 to the contents of the program Pv2. Therefore, in the storage unit 29, the content of the program Pv1 is changed to the content of the program Pv2 while maintaining the file name. The program Pv1 may be stored in an area different from the area where the program Pv2 is stored in the storage unit 29. In this case, the version management unit 21 may store the difference between the program Pv1 and the program Pv2 in the storage unit 29 instead of the program Pv2.
 また、バージョン管理部21は、プログラムPv2のコンパイルフラグ23をコンパイル済みから未コンパイルに書き換える。また、実行モジュールM1は、更新されない。したがって、記憶部29は、未コンパイルを示すコンパイルフラグ23と、プログラムPv2と、実行モジュールM1とを含んだプロジェクトデータ22を記憶する。 Also, the version management unit 21 rewrites the compile flag 23 of the program Pv2 from compiled to uncompiled. Further, the execution module M1 is not updated. Accordingly, the storage unit 29 stores the project data 22 including the compile flag 23 indicating uncompiled, the program Pv2, and the execution module M1.
 このように、プログラムPv1が編集されるだけの場合、編集後のプログラムPv2は、コンパイルされることなく管理装置20に送信されて、管理装置20の記憶部29で記憶される。この場合において、バージョン管理部21は、バージョン情報25にプログラムPv2を識別する情報と、プログラムPv2のバージョンを示すバージョン番号とを登録する。このバージョン番号は、ユーザによって指定されるものである。バージョン管理部21は、例えば、プログラムPv2のバージョンに「ver.2」が指定された場合、第2バージョンのプログラムPv2を識別する情報と、第2バージョンを示す「ver.2」とを対応付けしてバージョン情報25に登録する。 Thus, when only the program Pv1 is edited, the edited program Pv2 is transmitted to the management device 20 without being compiled and stored in the storage unit 29 of the management device 20. In this case, the version management unit 21 registers information identifying the program Pv2 and the version number indicating the version of the program Pv2 in the version information 25. This version number is specified by the user. For example, when “ver.2” is designated as the version of the program Pv2, the version management unit 21 associates information for identifying the second version of the program Pv2 with “ver.2” indicating the second version. And registered in the version information 25.
 図5は、実施の形態にかかるプログラム管理システムにおいて、プログラムが編集されてPLCに書き込まれる場合の処理手順を示すフローチャートである。第2のユーザであるユーザBBは、ユーザAAが用いたプログラミング支援装置30でプログラムPv2を編集してもよいし、ユーザAAが用いたプログラミング支援装置30とは異なるプログラミング支援装置でプログラムPv2を編集してもよい。ここでは、ユーザBBが、ユーザAAの用いたプログラミング支援装置30でプログラムPv2を編集する場合について説明する。以下に説明するステップS110からS170の処理は、プログラミング支援装置30によって実行される処理であり、ステップS180の処理は、管理装置20によって実行される処理である。 FIG. 5 is a flowchart showing a processing procedure when the program is edited and written in the PLC in the program management system according to the embodiment. The user BB who is the second user may edit the program Pv2 with the programming support device 30 used by the user AA, or edit the program Pv2 with a programming support device different from the programming support device 30 used by the user AA. May be. Here, a case where the user BB edits the program Pv2 with the programming support device 30 used by the user AA will be described. The processes in steps S110 to S170 described below are processes executed by the programming support apparatus 30, and the process in step S180 is a process executed by the management apparatus 20.
 ユーザBBがプログラムPv2を編集する場合、ユーザBBからの指示に従ってプログラミング支援装置30のプログラミング支援部31は、管理装置20からプログラムPv2、コンパイルフラグ23および実行モジュールM1を読み出して取得する(ステップS110)。このプログラムPv2、コンパイルフラグ23および実行モジュールM1は、記憶部39で記憶される。 When the user BB edits the program Pv2, the programming support unit 31 of the programming support device 30 reads and acquires the program Pv2, the compile flag 23, and the execution module M1 from the management device 20 in accordance with an instruction from the user BB (step S110). . The program Pv2, the compile flag 23, and the execution module M1 are stored in the storage unit 39.
 この後、プログラミング支援装置30のプログラミング支援部31は、ユーザBBの指示に従ってプログラムPv2を編集し、プログラムPv3を作成する(ステップS120)。さらに、プログラミング支援装置30のプログラミング支援部31は、PLC10へのプログラムPv3の書き込み指示をユーザBBから受付けると(ステップS130)、管理装置20から取得したプログラムPv2が最新バージョンのプログラムであるか否かを判定する(ステップS140)。 Thereafter, the programming support unit 31 of the programming support device 30 edits the program Pv2 according to the instruction of the user BB and creates the program Pv3 (step S120). Furthermore, when the programming support unit 31 of the programming support device 30 receives an instruction to write the program Pv3 to the PLC 10 from the user BB (step S130), whether or not the program Pv2 acquired from the management device 20 is the latest version of the program. Is determined (step S140).
 ここで、管理装置20から取得したプログラムPv2が最新バージョンのプログラムであるか否かを判定する理由について説明する。ユーザAAおよびユーザBBのように、複数人がプログラム編集を行う場合、ユーザBBがプログラム編集を行っている間に、他のユーザCCによってプログラム編集が行われる場合がある。例えば、ユーザBBがプログラムPv2からプログラムPv3を作成している間に、ユーザCCが、プログラムPv2からプログラムPv4を作成する場合がある。プログラムPv3が記憶部29に登録される前にプログラムPv4が記憶部29に登録されると、プログラムPv4が最新バージョンのプログラムとなり、プログラムPv2は最新バージョンでなくなる。このような状況で、ユーザBBが作成したプログラムPv3がPLC10に書き込まれると、最新でないプログラムPv2に対する編集で作成されたプログラムPv3がPLC10に書き込まれることとなり、プログラムPv3とプログラムPv4との整合性が取れなくなる。このため、プログラミング支援部31は、PLC10にプログラムPv3を書き込む前に、管理装置20から取得したプログラムPv2が最新バージョンのプログラムであるか否かを判定する。 Here, the reason for determining whether or not the program Pv2 acquired from the management apparatus 20 is the latest version of the program will be described. When a plurality of people perform program editing like the user AA and the user BB, the program editing may be performed by another user CC while the user BB is editing the program. For example, the user CC may create the program Pv4 from the program Pv2 while the user BB is creating the program Pv3 from the program Pv2. If the program Pv4 is registered in the storage unit 29 before the program Pv3 is registered in the storage unit 29, the program Pv4 becomes the latest version program, and the program Pv2 is not the latest version. In this situation, when the program Pv3 created by the user BB is written to the PLC 10, the program Pv3 created by editing the program Pv2 that is not the latest is written to the PLC 10, and the consistency between the program Pv3 and the program Pv4 is confirmed. I can't take it. Therefore, the programming support unit 31 determines whether or not the program Pv2 acquired from the management apparatus 20 is the latest version program before writing the program Pv3 into the PLC 10.
 管理装置20から取得したプログラムPv2が最新バージョンのプログラムでない場合(ステップS140、No)、プログラムPv3は、最新バージョンでないプログラムから編集されたものとなっているので、プログラミング支援装置30のプログラミング支援部31は、PLC10への書き込みは不可であると判定する(ステップS150)。このように、プログラミング支援部31は、プログラムPv2が最新バージョンのプログラムでない場合には、実行モジュールM2を作成しない。 When the program Pv2 acquired from the management device 20 is not the latest version program (No in step S140), the program Pv3 is edited from a program that is not the latest version, and therefore the programming support unit 31 of the programming support device 30 is used. Determines that writing to the PLC 10 is not possible (step S150). Thus, the programming support unit 31 does not create the execution module M2 when the program Pv2 is not the latest version of the program.
 一方、管理装置20から取得したプログラムPv2が最新バージョンのプログラムである場合(ステップS140、Yes)、プログラミング支援装置30のプログラミング支援部31は、PLC10内の実行モジュールM1と、管理装置20から取得した実行モジュールM1とが同一であるか否かを確認する(ステップS155)。 On the other hand, when the program Pv2 acquired from the management device 20 is the latest version of the program (step S140, Yes), the programming support unit 31 of the programming support device 30 acquires the execution module M1 in the PLC 10 and the management device 20. It is confirmed whether or not the execution module M1 is the same (step S155).
 プログラミング支援部31は、例えば、実行モジュールM1のバイナリーデータのハッシュ値を比較することによって、実行モジュールM1の同一性を判定する。この場合、プログラミング支援部31は、PLC10内の実行モジュールM1のバイナリーデータから第1のハッシュ値を算出し、これから実行中書き込みを実施しようとした際に管理装置20から取得した実行モジュールM1のバイナリーデータから第2のハッシュ値を算出する。そして、プログラミング支援部31は、算出した第1のハッシュ値と第2のハッシュ値とを比較する。プログラミング支援部31は、この比較結果に基づいて、PLC10内の実行モジュールM1と、これから実行中書き込みを実施しようとした際に管理装置20から取得した実行モジュールM1と、が同一であるか否かを判定する。 The programming support unit 31 determines the identity of the execution module M1, for example, by comparing the hash values of the binary data of the execution module M1. In this case, the programming support unit 31 calculates the first hash value from the binary data of the execution module M1 in the PLC 10, and from this, the binary of the execution module M1 acquired from the management device 20 when attempting to perform the write during execution. A second hash value is calculated from the data. Then, the programming support unit 31 compares the calculated first hash value with the second hash value. Based on the comparison result, the programming support unit 31 determines whether or not the execution module M1 in the PLC 10 is the same as the execution module M1 acquired from the management apparatus 20 when an ongoing write is to be performed. Determine.
 プログラミング支援部31が、第1のハッシュ値と第2のハッシュ値とを比較することによって実行モジュールM1の同一性を判定する場合、プログラミング支援部31は、実行モジュールM1の代わりに第2のハッシュ値を管理装置20に送信しておいてもよい。すなわち、プログラミング支援部31は、実行モジュールM1の代わりに、実行モジュールM1に固有の情報を管理装置20に送信しておけばよい。これにより、プログラミング支援部31は、管理装置20から実行モジュールM1に固有の情報を取得することができるので、PLC10内の実行モジュールM1と、管理装置20で管理されている実行モジュールM1とが同一であるか否かを確認することができる。実行モジュールM1に固有の情報は、実行モジュールM1そのものであってもよい。なお、プログラミング支援部31は、実行モジュールM1のバイナリーデータを上述した方法に限らず何れの方法で比較してもよい。 When the programming support unit 31 determines the identity of the execution module M1 by comparing the first hash value and the second hash value, the programming support unit 31 uses the second hash instead of the execution module M1. The value may be transmitted to the management device 20. That is, the programming support unit 31 may transmit information unique to the execution module M1 to the management device 20 instead of the execution module M1. Thereby, since the programming support part 31 can acquire the information specific to the execution module M1 from the management apparatus 20, the execution module M1 in the PLC 10 and the execution module M1 managed by the management apparatus 20 are the same. It can be confirmed whether or not. The information unique to the execution module M1 may be the execution module M1 itself. The programming support unit 31 may compare the binary data of the execution module M1 by any method, not limited to the method described above.
 PLC10内の実行モジュールM1と、管理装置20から取得した実行モジュールM1とが同一でない場合(ステップS155、No)、何らかの異常が発生している可能性があるので、プログラミング支援装置30のプログラミング支援部31は、PLC10への書き込みは不可であると判定する(ステップS150)。この場合、プログラミング支援部31は、実行モジュールM2を作成しない。このように、プログラミング支援部31は、PLC10内の実行モジュールM1と、管理装置20から取得した実行モジュールM1とが同一でない場合には、実行モジュールM2を作成しない。 If the execution module M1 in the PLC 10 and the execution module M1 acquired from the management device 20 are not the same (No in step S155), there is a possibility that some abnormality has occurred, so the programming support unit of the programming support device 30 31 determines that writing to the PLC 10 is not possible (step S150). In this case, the programming support unit 31 does not create the execution module M2. Thus, the programming support unit 31 does not create the execution module M2 when the execution module M1 in the PLC 10 and the execution module M1 acquired from the management apparatus 20 are not the same.
 PLC10内の実行モジュールM1と、管理装置20から取得した実行モジュールM1とが同一である場合(ステップS155、Yes)、プログラミング支援装置30のプログラミング支援部31は、編集後のプログラムであるプログラムPv3のコンパイルを行うことによって、プログラムPv3に対応する実行モジュールM3を作成する(ステップS156)。このように、プログラミング支援部31は、プログラムPv2が最新バージョンのプログラムであり、かつPLC10内の実行モジュールM1と、管理装置20から取得した実行モジュールM1とが同一である場合には、実行モジュールM3を作成する。 When the execution module M1 in the PLC 10 and the execution module M1 acquired from the management device 20 are the same (step S155, Yes), the programming support unit 31 of the programming support device 30 sets the program Pv3 that is the edited program. By executing the compilation, an execution module M3 corresponding to the program Pv3 is created (step S156). As described above, when the program Pv2 is the latest version program and the execution module M1 in the PLC 10 is the same as the execution module M1 acquired from the management device 20, the programming support unit 31 executes the execution module M3. Create
 プログラミング支援部31は、例えば、コンパイルフラグ23に基づいて、編集後のプログラムであるプログラムPv3と、PLC10で実行中の実行モジュールM1に対応するプログラムPv1との差分を算出し、差分をコンパイルすることによって、差分のプログラムPv3に対応する実行モジュールM3を作成する。すなわち、ここでは、プログラムPv2のコンパイルフラグ23が未コンパイルなので、プログラミング支援部31は、プログラムPv3とプログラムPv2との差分と、プログラムPv2とプログラムPv1との差分と、の合計を用いて実行モジュールM3を作成する。 For example, based on the compile flag 23, the programming support unit 31 calculates a difference between the edited program Pv3 and the program Pv1 corresponding to the execution module M1 being executed by the PLC 10, and compiles the difference. Thus, an execution module M3 corresponding to the difference program Pv3 is created. That is, since the compile flag 23 of the program Pv2 is not compiled here, the programming support unit 31 uses the sum of the difference between the program Pv3 and the program Pv2 and the difference between the program Pv2 and the program Pv1 to execute the module M3. Create
 さらに、プログラミング支援装置30のプログラミング支援部31は、作成した実行モジュールM3をPLC10に送信しPLC10に書き込む(ステップS160)。この場合において、PLC10は、編集前のプログラムPv2に対応する実行モジュールM1を用いて動作中である。この場合であっても、PLC10は、差分の実行モジュールM3を適用することによって、実行モジュールM3の実行中書き込みを行う。PLC10は、実行モジュールM1をループ処理しているので、差分の実行モジュールM3は、つぎのループの先頭から適用される。 Further, the programming support unit 31 of the programming support device 30 transmits the created execution module M3 to the PLC 10 and writes it in the PLC 10 (step S160). In this case, the PLC 10 is operating using the execution module M1 corresponding to the program Pv2 before editing. Even in this case, the PLC 10 writes the execution module M3 during execution by applying the differential execution module M3. Since the PLC 10 loops the execution module M1, the difference execution module M3 is applied from the head of the next loop.
 また、プログラミング支援装置30のプログラミング支援部31は、作成したプログラムPv3、および作成した実行モジュールM3を管理装置20に送信する(ステップS170)。このように、本実施の形態では、プログラミング支援部31は、実行モジュールM3をPLC10に書き込む場合には、プログラムPv3および実行モジュールM3を管理装置20に送信する。これにより、管理装置20のバージョン管理部21は、プログラミング支援部31からのプログラムPv3を最新バージョンのプログラムとして記憶部29に記憶させる。また、管理装置20のバージョン管理部21は、プログラミング支援部31からの実行モジュールM3を最新の実行モジュールM3として記憶部29に記憶させる。さらに、管理装置20のバージョン管理部21は、プログラムPv3とともに実行モジュールM3を受信したので、プログラムPv3のコンパイルフラグ23をコンパイル済みに変更する(ステップS180)。このステップS170,S180の処理は、管理装置20に保存されるプログラムPv3とPLC10に書き込まれた実行モジュールM3に対応するプログラムPv3との間に乖離が起きないようにするための処理である。 Further, the programming support unit 31 of the programming support device 30 transmits the created program Pv3 and the created execution module M3 to the management device 20 (step S170). Thus, in the present embodiment, the programming support unit 31 transmits the program Pv3 and the execution module M3 to the management device 20 when writing the execution module M3 into the PLC 10. Thereby, the version management unit 21 of the management apparatus 20 stores the program Pv3 from the programming support unit 31 in the storage unit 29 as the latest version program. Also, the version management unit 21 of the management device 20 stores the execution module M3 from the programming support unit 31 in the storage unit 29 as the latest execution module M3. Furthermore, since the version management unit 21 of the management apparatus 20 has received the execution module M3 together with the program Pv3, the version flag of the program Pv3 is changed to compiled (step S180). The processing in steps S170 and S180 is processing for preventing a divergence between the program Pv3 stored in the management apparatus 20 and the program Pv3 corresponding to the execution module M3 written in the PLC 10.
 なお、本実施の形態では、PLC10で実行している実行モジュールMxと、管理装置20で管理されている実行モジュールMxとが同一となるので、ステップS155の処理は省略されてもよいが、同一性を確認するためには、ステップS155の処理を実行する方が望ましい。 In the present embodiment, the execution module Mx being executed by the PLC 10 and the execution module Mx being managed by the management apparatus 20 are the same, so that the process of step S155 may be omitted, but the same In order to confirm the property, it is preferable to execute the process of step S155.
 図6は、図5の処理が実行された後に実施の形態にかかる管理装置が記憶している情報を説明するための図である。図5の処理が実行されることにより、管理装置20のバージョン管理部21は、プログラムPv3を記憶部29に記憶させる。具体的には、バージョン管理部21は、プログラムPv2のファイル名で記憶されていたファイルを、プログラムPv3の内容に変更する。したがって、記憶部29では、ファイル名を維持したままプログラムPv2の内容がプログラムPv3の内容に変更される。なお、プログラムPv2は、記憶部29内でプログラムPv3が保存される領域とは別の領域に保存しておいてもよい。この場合、バージョン管理部21は、プログラムPv3の代わりにプログラムPv2とプログラムPv3との差分を記憶部29に記憶させてもよい。 FIG. 6 is a diagram for explaining information stored in the management apparatus according to the embodiment after the process of FIG. 5 is executed. 5 is executed, the version management unit 21 of the management apparatus 20 stores the program Pv3 in the storage unit 29. Specifically, the version management unit 21 changes the file stored with the file name of the program Pv2 to the contents of the program Pv3. Therefore, in the storage unit 29, the contents of the program Pv2 are changed to the contents of the program Pv3 while maintaining the file name. Note that the program Pv2 may be stored in an area different from the area where the program Pv3 is stored in the storage unit 29. In this case, the version management unit 21 may store the difference between the program Pv2 and the program Pv3 in the storage unit 29 instead of the program Pv3.
 また、バージョン管理部21は、プログラムPv3のコンパイルフラグ23を未コンパイルからコンパイル済みに書き換える。また、バージョン管理部21は、実行モジュールM3を記憶部29に記憶させる。具体的には、バージョン管理部21は、実行モジュールM1のファイル名で記憶されていたファイルを、実行モジュールM3の内容に変更する。したがって、記憶部29では、ファイル名を維持したまま実行モジュールM1の内容が実行モジュールM3の内容に変更される。これにより、記憶部29は、コンパイル済みを示すコンパイルフラグ23と、プログラムPv3と、実行モジュールM3とを含んだプロジェクトデータ22を記憶する。 Also, the version management unit 21 rewrites the compilation flag 23 of the program Pv3 from uncompiled to compiled. Also, the version management unit 21 stores the execution module M3 in the storage unit 29. Specifically, the version management unit 21 changes the file stored with the file name of the execution module M1 to the contents of the execution module M3. Therefore, in the storage unit 29, the contents of the execution module M1 are changed to the contents of the execution module M3 while maintaining the file name. As a result, the storage unit 29 stores the project data 22 including the compile flag 23 indicating completion of compilation, the program Pv3, and the execution module M3.
 このように、プログラムPv3がコンパイルされる場合、プログラムPv3に対応する実行モジュールM3が、管理装置20の記憶部29で記憶される。この場合において、バージョン管理部21は、バージョン情報25にプログラムPv3を識別する情報と、プログラムPv3のバージョンを示すバージョン番号とを登録する。このバージョン番号は、ユーザによって指定されるものである。バージョン管理部21は、例えば、プログラムPv3のバージョンに「ver.3」が指定された場合、第3バージョンのプログラムPv3を識別する情報と、第3バージョンを示す「ver.3」とを対応付けしてバージョン情報25に登録する。 As described above, when the program Pv3 is compiled, the execution module M3 corresponding to the program Pv3 is stored in the storage unit 29 of the management device 20. In this case, the version management unit 21 registers information for identifying the program Pv3 and a version number indicating the version of the program Pv3 in the version information 25. This version number is specified by the user. For example, when “ver.3” is designated as the version of the program Pv3, the version management unit 21 associates information for identifying the third version of the program Pv3 with “ver.3” indicating the third version. And registered in the version information 25.
 なお、プログラムPv1からプログラムPv2が作成されていない場合には、プログラムPv1からプログラムPv3が作成される。この場合、プログラムPv1が第1バージョンのプログラムであり、プログラムPv3が第2バージョンのプログラムである。また、実行モジュールM1が第1バージョンの実行モジュールであり、実行モジュールM3が第2バージョンの実行モジュールである。 If the program Pv2 is not created from the program Pv1, the program Pv3 is created from the program Pv1. In this case, the program Pv1 is a first version program, and the program Pv3 is a second version program. The execution module M1 is a first version execution module, and the execution module M3 is a second version execution module.
 このように、本実施の形態では、プログラミング支援部31が、実行モジュールM3をPLC10に送信する際に、実行モジュールM3と、編集後のプログラムPv3とを管理装置20に送信する。そして、管理装置20のバージョン管理部21が、差分の実行モジュールM3と、編集後のプログラムPv3とを記憶部29に格納し、さらに、編集後のプログラムPv3に対応するコンパイルフラグ23を、コンパイル済みに設定する。 Thus, in the present embodiment, when the programming support unit 31 transmits the execution module M3 to the PLC 10, the programming module 31 transmits the execution module M3 and the edited program Pv3 to the management apparatus 20. Then, the version management unit 21 of the management device 20 stores the difference execution module M3 and the edited program Pv3 in the storage unit 29, and further compiles the compile flag 23 corresponding to the edited program Pv3. Set to.
 これにより、プログラム管理システム1は、PLC10内の実行モジュールMxと、管理装置20から取得した実行モジュールMxとを一致させることができる。また、プログラミング支援装置30は、管理装置20に実行モジュールM1を送信しているので、実行モジュールM3を作成する際には、PLC10からではなく管理装置20から実行モジュールM1を取得することができる。管理装置20はPLC10よりも処理能力が高く、また通信速度も速いので、プログラミング支援装置30は、PLC10から実行モジュールM1を取得するよりも、管理装置20から実行モジュールM1を取得する方が短時間で実行モジュールM1を取得することができる。 Thereby, the program management system 1 can match the execution module Mx in the PLC 10 with the execution module Mx acquired from the management device 20. Moreover, since the programming support apparatus 30 has transmitted the execution module M1 to the management apparatus 20, when creating the execution module M3, the execution module M1 can be acquired from the management apparatus 20 instead of from the PLC 10. Since the management device 20 has a higher processing capability and faster communication speed than the PLC 10, the programming support device 30 acquires the execution module M1 from the management device 20 rather than acquiring the execution module M1 from the PLC 10. The execution module M1 can be acquired.
 なお、第1のユーザであるユーザAAと第2のユーザであるユーザBBは、同一人物であってもよいし、異なる人物であってもよい。また、コンパイルフラグ23は、プログラミング支援部31が設定してもよい。この場合、プログラミング支援部31は、設定したコンパイルフラグ23を管理装置20に送信する。これにより、管理装置20がプログラミング支援部31から送られてきたコンパイルフラグ23を記憶する。 Note that the user AA as the first user and the user BB as the second user may be the same person or different persons. The compile flag 23 may be set by the programming support unit 31. In this case, the programming support unit 31 transmits the set compile flag 23 to the management device 20. As a result, the management apparatus 20 stores the compile flag 23 sent from the programming support unit 31.
 ここで、プログラミング支援装置30のハードウェア構成について説明する。図7は、実施の形態にかかるプログラミング支援装置を実現するハードウェア構成を示す図である。 Here, the hardware configuration of the programming support device 30 will be described. FIG. 7 is a diagram illustrating a hardware configuration that implements the programming support apparatus according to the embodiment.
 プログラミング支援装置30は、表示装置101、入力装置102、プロセッサ103、メモリ104および通信装置105を含むハードウェア100で実現される。表示装置101は、情報を表示する装置であり、液晶ディスプレイが例示されるがこれに限定されるものではない。 The programming support device 30 is realized by hardware 100 including a display device 101, an input device 102, a processor 103, a memory 104, and a communication device 105. The display device 101 is a device that displays information, and is exemplified by a liquid crystal display, but is not limited thereto.
 入力装置102は、プログラミング支援部31に対して文字を含む各種情報を入力するための装置であり、キーボード、マウス、ポインティングデバイスおよびタッチパネルが例示されるが、これらに限定されるものではない。入力装置102は、ユーザによる各種操作を受け付ける場合に使用される。すなわち、入力装置102は、プログラミング支援部31がユーザからの指示を受け付ける場合に使用される。 The input device 102 is a device for inputting various types of information including characters to the programming support unit 31, and examples thereof include a keyboard, a mouse, a pointing device, and a touch panel, but are not limited thereto. The input device 102 is used when receiving various operations by the user. That is, the input device 102 is used when the programming support unit 31 receives an instruction from the user.
 通信装置105は、管理装置20との間、およびPLC10との間で通信を実行する。通信装置105は、管理装置20からコンパイルフラグ23、プログラムPおよび実行モジュールMxといった各種データを受信し、プログラミング支援部31が作成したプログラムPおよび実行モジュールMxといった各種データを管理装置20に送信する。また、通信装置105は、プログラミング支援部31が作成した実行モジュールMxをPLC10に送信し、PLC10に格納されている実行モジュールMxのバイナリーデータをPLC10から受信する。 The communication device 105 performs communication with the management device 20 and with the PLC 10. The communication device 105 receives various data such as the compile flag 23, the program P, and the execution module Mx from the management device 20, and transmits various data such as the program P and the execution module Mx created by the programming support unit 31 to the management device 20. In addition, the communication device 105 transmits the execution module Mx created by the programming support unit 31 to the PLC 10 and receives binary data of the execution module Mx stored in the PLC 10 from the PLC 10.
 プログラミング支援装置30が有するプログラミング支援部31の機能は、プロセッサ103およびメモリ104により実現される。プロセッサ103は、CPU(Central Processing Unit:中央処理装置)、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、又はDSP(Digital Signal Processor)ともいう。記憶部39は、メモリ104により実現される。メモリ104は、RAM(Random Access Memory)、ROM(Read Only Memory)などを含んでいる。 The function of the programming support unit 31 included in the programming support device 30 is realized by the processor 103 and the memory 104. The processor 103 is also referred to as a CPU (Central Processing Unit), a processing device, an arithmetic device, a microprocessor, a microcomputer, or a DSP (Digital Signal Processor). The storage unit 39 is realized by the memory 104. The memory 104 includes a RAM (Random Access Memory), a ROM (Read Only Memory), and the like.
 すなわち、プログラミング支援部31の機能は、ソフトウェア、ファームウェア、又はソフトウェアとファームウェアとの組合せにより実現される。ソフトウェア及びファームウェアはプログラムとして記述され、メモリ104に記憶される。プロセッサ103は、メモリ104に記憶されたプログラムを読み出して実行することにより、プログラミング支援部31の機能を実現する。このプログラムは、プログラミング支援部31が実行する手順をコンピュータに実行させるものであるともいえる。 That is, the function of the programming support unit 31 is realized by software, firmware, or a combination of software and firmware. Software and firmware are described as programs and stored in the memory 104. The processor 103 implements the function of the programming support unit 31 by reading and executing the program stored in the memory 104. This program can be said to cause a computer to execute the procedure executed by the programming support unit 31.
 なお、プログラミング支援部31の機能について、一部を専用のハードウェアで実現し、一部をソフトウェアまたはファームウェアで実現するようにしてもよい。また、管理装置20も、プログラミング支援装置30と同様の構成を有したハードウェア100で実現することができる。 Note that part of the functions of the programming support unit 31 may be realized by dedicated hardware, and part of it may be realized by software or firmware. The management device 20 can also be realized by the hardware 100 having the same configuration as the programming support device 30.
 このように、プログラム管理システム1は、実行モジュールMxの管理を行っているので、プログラム開発時に複数のユーザがプログラムPを編集するような場合であっても、PLC10への実行中書き込みを容易に実現することができる。 As described above, since the program management system 1 manages the execution module Mx, even when a plurality of users edit the program P at the time of program development, it is easy to write to the PLC 10 during execution. Can be realized.
 また、管理装置20で管理される実行モジュールMxは、PLC10に書き込んだ際の実行モジュールMxと常に同様のものになるので、プログラム管理システム1は、実行モジュールMxのバージョン管理を行いつつ実行中書き込みが可能となる。なお、プログラム管理システム1は、複数のPLC10を有していてもよい。この場合、管理装置20は、PLC10毎に実行モジュールMxを管理する。なお、管理装置20は、複数のPLC10に対して共通の実行モジュールMxを管理することにより、複数のPLC10に対して共通の実行モジュールMxを書き込むことが可能となる。 Further, the execution module Mx managed by the management device 20 is always the same as the execution module Mx at the time of writing to the PLC 10, so that the program management system 1 performs the in-execution writing while performing version management of the execution module Mx. Is possible. The program management system 1 may have a plurality of PLCs 10. In this case, the management device 20 manages the execution module Mx for each PLC 10. The management apparatus 20 can write the common execution module Mx to the plurality of PLCs 10 by managing the common execution module Mx for the plurality of PLCs 10.
 このように実施の形態によれば、プログラムPv2が作成されても実行モジュールM2がPLC10に書き込まれない場合には、この実行モジュールM2は管理装置20に送信されない。この場合、管理装置20は、プログラムPv2と、実行モジュールM1と、未コンパイルを示すコンパイルフラグ23とを記憶しておく。また、プログラムPv3が作成されて実行モジュールM3がPLC10に書き込まれる場合には、管理装置20は、プログラムPv3と、実行モジュールM3と、コンパイル済みに設定されたコンパイルフラグ23とを記憶しておく。これにより、プログラミング支援装置30で作成された実行モジュールがPLC10に反映されていない場合であっても、PLC10で実行中の実行モジュールのバージョンと、管理装置20が記憶している実行モジュールのバージョンとを一致させることができる。また、管理装置20で最新のプログラムを記憶することができるとともに、この最新のプログラムがコンパイル済みであるか否かを管理することができる。この結果、プログラミング支援装置30が管理装置20で記憶しているプログラムを読み出して編集しコンパイルした場合に、PLC10への実行中書き込みが禁止されることが少なくなる。また、プログラミング支援装置30で作成された実行モジュールM2をPLC10に反映しないような運用も可能となる。したがって、効率良くプログラムを開発することができる。 As described above, according to the embodiment, when the execution module M2 is not written in the PLC 10 even if the program Pv2 is created, the execution module M2 is not transmitted to the management apparatus 20. In this case, the management apparatus 20 stores a program Pv2, an execution module M1, and a compile flag 23 indicating uncompiled. When the program Pv3 is created and the execution module M3 is written to the PLC 10, the management device 20 stores the program Pv3, the execution module M3, and the compile flag 23 set to be compiled. Thereby, even if the execution module created by the programming support device 30 is not reflected in the PLC 10, the version of the execution module being executed in the PLC 10, the version of the execution module stored in the management device 20 and Can be matched. In addition, the management apparatus 20 can store the latest program and can manage whether or not the latest program has been compiled. As a result, when the programming support device 30 reads, edits, and compiles the program stored in the management device 20, writing during execution to the PLC 10 is less likely to be prohibited. Further, an operation in which the execution module M2 created by the programming support device 30 is not reflected on the PLC 10 is also possible. Therefore, the program can be developed efficiently.
 以上の実施の形態に示した構成は、本発明の内容の一例を示すものであり、別の公知の技術と組み合わせることも可能であるし、本発明の要旨を逸脱しない範囲で、構成の一部を省略、変更することも可能である。 The configuration described in the above embodiment shows an example of the contents of the present invention, and can be combined with another known technique, and can be combined with other configurations without departing from the gist of the present invention. It is also possible to omit or change the part.
 1 プログラム管理システム、20 管理装置、21 バージョン管理部、22 プロジェクトデータ、23 コンパイルフラグ、25 バージョン情報、29 記憶部、30 プログラミング支援装置、31 プログラミング支援部、39 記憶部、M1,M3,Mx 実行モジュール、P,Pv1~Pv3 プログラム。 1 program management system, 20 management device, 21 version management unit, 22 project data, 23 compile flag, 25 version information, 29 storage unit, 30 programming support device, 31 programming support unit, 39 storage unit, M1, M3, Mx execution Module, P, Pv1-Pv3 program.

Claims (9)

  1.  第1バージョンのプログラムを用いたコンパイルが行われることによって作成された第1バージョンの実行モジュールで被制御機器を制御する制御装置に接続されるとともに、前記第1バージョンのプログラムを編集して第2バージョンのプログラムを作成し、コンパイルによって、前記第1バージョンのプログラムと前記第2バージョンのプログラムとの差分に対応する第2バージョンの実行モジュールを作成するプログラミング支援装置と、
     前記制御装置で実行中の実行モジュールと、最新バージョンのプログラムと、前記最新バージョンのプログラムがコンパイル済みであるか否かを示すコンパイル情報と、を管理する管理装置と、
     を備え、
     前記プログラミング支援装置は、
     前記第1バージョンの実行モジュールを実行中の前記制御装置に対して前記第2バージョンの実行モジュールを書き込む場合には、前記管理装置に前記第2バージョンのプログラムと、前記第2バージョンの実行モジュールに固有の情報とを送信し、前記第1バージョンの実行モジュールを実行中の前記制御装置に対して前記第2バージョンの実行モジュールを書き込まない場合には、前記管理装置に前記第2バージョンのプログラムを送信し、
     前記管理装置は、前記第2バージョンのプログラムおよび前記第2バージョンの実行モジュールに固有の情報を受信した場合には、前記第2バージョンのプログラムを前記最新バージョンのプログラムとして管理し、前記第2バージョンの実行モジュールを前記制御装置で実行中の実行モジュールとして管理し、前記コンパイル情報をコンパイル済みであることを示す情報に設定し、前記第2バージョンの実行モジュールに固有の情報を受信せず前記第2バージョンのプログラムを受信した場合には、前記第2バージョンのプログラムを前記最新バージョンのプログラムとして管理し、前記第1バージョンの実行モジュールを前記制御装置で実行中の実行モジュールとして管理し、前記コンパイル情報をコンパイル済みでないことを示す情報に設定する、
     ことを特徴とするプログラム管理システム。
    The first version of the execution module created by compiling using the first version of the program is connected to a control device that controls the controlled device, and the second version is edited by editing the first version of the program. A programming support device that creates a version program and creates a second version execution module corresponding to the difference between the first version program and the second version program by compiling;
    A management device that manages an execution module being executed in the control device, a latest version of the program, and compile information indicating whether or not the latest version of the program has been compiled;
    With
    The programming support device includes:
    When writing the second version of the execution module to the control device that is executing the first version of the execution module, the second version of the program and the second version of the execution module are stored in the management device. When the second version of the execution module is not written to the control device that is executing the first version of the execution module, the second version of the program is stored in the management device. Send
    When the management device receives information specific to the second version program and the second version execution module, the management device manages the second version program as the latest version program, and The execution module is managed as an execution module being executed by the control device, the compile information is set to information indicating that it has been compiled, and the second version of the execution module does not receive information unique to the second version of the execution module. When a two-version program is received, the second version program is managed as the latest version program, the first version execution module is managed as an execution module being executed by the control device, and the compilation Information indicating that the information has not been compiled To set up,
    A program management system characterized by that.
  2.  前記プログラミング支援装置は、前記第2バージョンのプログラムを編集して作成した第3バージョンのプログラムをコンパイルする際に、前記コンパイル情報がコンパイル済みであることを示す場合には、前記第2バージョンのプログラムおよび前記第3バージョンのプログラムを用いたコンパイルによって第3バージョンの実行モジュールを作成し、前記コンパイル情報がコンパイル済みでないことを示す場合には、前記第1バージョンのプログラム、前記第2バージョンのプログラムおよび前記第3バージョンのプログラムを用いたコンパイルによって前記第3バージョンの実行モジュールを作成する、
     ことを特徴とする請求項1に記載のプログラム管理システム。
    When the programming support apparatus compiles the third version program created by editing the second version program, if the compilation information indicates that it has been compiled, the second version program When the third version of the execution module is created by compilation using the third version of the program and the compilation information indicates that the program has not been compiled, the first version of the program, the second version of the program, and Creating an execution module of the third version by compiling with the third version of the program;
    The program management system according to claim 1.
  3.  前記プログラミング支援装置は、前記第2バージョンの実行モジュールを作成する前に、前記第1バージョンのプログラムが前記最新バージョンのプログラムであるか否かを判定し、前記最新バージョンのプログラムである場合には、前記第2バージョンの実行モジュールを作成し、前記最新バージョンのプログラムでない場合には、前記第2バージョンの実行モジュールを作成しない、
     ことを特徴とする請求項1または2に記載のプログラム管理システム。
    The programming support apparatus determines whether or not the first version program is the latest version program before creating the second version execution module, and if the first version program is the latest version program, The second version of the execution module is created, and if the program is not the latest version of the program, the second version of the execution module is not created.
    The program management system according to claim 1 or 2, wherein
  4.  前記プログラミング支援装置は、前記第2バージョンの実行モジュールを作成する前に、前記管理装置で管理されている第1バージョンの実行モジュールと、前記制御装置で実行されている第1バージョンの実行モジュールとが同じであるか否かを判定し、同じである場合には、前記第2バージョンの実行モジュールを作成し、同じでない場合には、前記第2バージョンの実行モジュールを作成しない、
     ことを特徴とする請求項1から3のいずれか1つに記載のプログラム管理システム。
    The programming support apparatus includes a first version execution module managed by the management apparatus and a first version execution module executed by the control apparatus before creating the second version execution module. Are determined to be the same, if they are the same, the second version of the execution module is created, and if not, the second version of the execution module is not created.
    The program management system according to any one of claims 1 to 3.
  5.  前記プログラミング支援装置は、複数の前記制御装置に接続され、
     前記管理装置は、複数の前記制御装置に対して共通の、前記第2バージョンのプログラム、前記第2バージョンの実行モジュール、および前記コンパイル情報を管理する、
     ことを特徴とする請求項1から4のいずれか1つに記載のプログラム管理システム。
    The programming support device is connected to a plurality of the control devices,
    The management device manages the second version of the program, the second version of the execution module, and the compilation information that are common to the plurality of control devices.
    The program management system according to claim 1, wherein:
  6.  前記コンパイル情報は、前記管理装置または前記プログラミング支援装置によって設定され、前記管理装置で管理される、
     ことを特徴とする請求項1から5のいずれか1つに記載のプログラム管理システム。
    The compile information is set by the management device or the programming support device and managed by the management device.
    The program management system according to any one of claims 1 to 5, wherein:
  7.  第1バージョンのプログラムを用いたコンパイルが行われることによって作成された第1バージョンの実行モジュールで被制御機器を制御する制御装置に接続されるとともに、前記第1バージョンのプログラムを編集して第2バージョンのプログラムを作成し、コンパイルによって、前記第1バージョンのプログラムと前記第2バージョンのプログラムとの差分に対応する第2バージョンの実行モジュールを作成するプログラミング支援部を備え、
     前記プログラミング支援部は、
     前記制御装置で実行中の実行モジュールと、最新バージョンのプログラムと、前記最新バージョンのプログラムがコンパイル済みであるか否かを示すコンパイル情報と、を管理する管理装置に接続され、
     前記第1バージョンの実行モジュールを実行中の前記制御装置に対して前記第2バージョンの実行モジュールを書き込む場合には、前記管理装置に前記第2バージョンのプログラムと、前記第2バージョンの実行モジュールに固有の情報とを送信し、前記第1バージョンの実行モジュールを実行中の前記制御装置に対して前記第2バージョンの実行モジュールを書き込まない場合には、前記管理装置に前記第2バージョンのプログラムを送信する、
     ことを特徴とするプログラミング支援装置。
    The first version of the execution module created by compiling using the first version of the program is connected to a control device that controls the controlled device, and the second version is edited by editing the first version of the program. A programming support unit for creating a version program and creating a second version execution module corresponding to a difference between the first version program and the second version program by compiling;
    The programming support unit
    Connected to a management device that manages an execution module being executed in the control device, a latest version of the program, and compile information indicating whether or not the latest version of the program has been compiled;
    When writing the second version of the execution module to the control device that is executing the first version of the execution module, the second version of the program and the second version of the execution module are stored in the management device. When the second version of the execution module is not written to the control device that is executing the first version of the execution module, the second version of the program is stored in the management device. Send,
    A programming support apparatus characterized by that.
  8.  第1バージョンのプログラムを用いたコンパイルが行われることによって作成された第1バージョンの実行モジュールで制御装置が被制御機器を制御する制御ステップと、
     前記第1バージョンのプログラムを編集して第2バージョンのプログラムを作成するプログラム編集ステップと、
     コンパイルによって、前記第1バージョンのプログラムと前記第2バージョンのプログラムとの差分に対応する第2バージョンの実行モジュールを作成する実行モジュール作成ステップと、
     前記制御装置で実行中の実行モジュールと、最新バージョンのプログラムと、前記最新バージョンのプログラムがコンパイル済みであるか否かを示すコンパイル情報と、を管理する管理ステップと、
     を含み、
     前記第1バージョンの実行モジュールを実行中の前記制御装置に対して前記第2バージョンの実行モジュールを書き込む場合には、前記第2バージョンのプログラムを前記最新バージョンのプログラムとして管理し、前記第2バージョンのプログラムに固有の情報を用いて前記第2バージョンの実行モジュールを前記制御装置で実行中の実行モジュールとして管理し、前記コンパイル情報をコンパイル済みであることを示す情報に設定し、
     前記第1バージョンの実行モジュールを実行中の前記制御装置に対して前記第2バージョンの実行モジュールを書き込まない場合には、前記第2バージョンのプログラムを前記最新バージョンのプログラムとして管理し、前記第1バージョンの実行モジュールを前記制御装置で実行中の実行モジュールとして管理し、前記コンパイル情報をコンパイル済みでないことを示す情報に設定する、
     ことを特徴とするプログラム管理方法。
    A control step in which the control device controls the controlled device by the execution module of the first version created by compiling using the first version of the program;
    A program editing step of editing the first version of the program to create a second version of the program;
    An execution module creating step of creating a second version execution module corresponding to a difference between the first version program and the second version program by compiling;
    A management step for managing an execution module being executed in the control device, a latest version of the program, and compile information indicating whether or not the latest version of the program has been compiled;
    Including
    When writing the second version of the execution module to the control device that is executing the first version of the execution module, the second version of the program is managed as the latest version of the program. Managing the second version of the execution module as an execution module being executed by the control device using information unique to the program, and setting the compile information to information indicating that it has been compiled,
    When the second version of the execution module is not written to the control device that is executing the first version of the execution module, the second version of the program is managed as the latest version of the program. Managing an execution module of a version as an execution module being executed in the control device, and setting the compile information to information indicating that it has not been compiled,
    And a program management method.
  9.  第1バージョンのプログラムを用いたコンパイルが行われることによって作成された第1バージョンの実行モジュールで制御装置が被制御機器を制御している際に、前記第1バージョンのプログラムを編集して第2バージョンのプログラムを作成し、コンパイルによって、前記第1バージョンのプログラムと前記第2バージョンのプログラムとの差分に対応する第2バージョンの実行モジュールを作成する作成ステップと、
     前記第1バージョンの実行モジュールを実行中の前記制御装置に対して前記第2バージョンの実行モジュールを書き込む場合には、前記制御装置で実行中の実行モジュールと、最新バージョンのプログラムと、前記最新バージョンのプログラムがコンパイル済みであるか否かを示すコンパイル情報と、を管理する管理装置に、前記第2バージョンのプログラムおよび前記第2バージョンの実行モジュールに固有の情報を送信し、前記第1バージョンの実行モジュールを実行中の前記制御装置に対して前記第2バージョンの実行モジュールを書き込まない場合には、前記管理装置に前記第2バージョンのプログラムを送信する送信ステップと、
     をコンピュータに実行させる、
     ことを特徴とするプログラミング支援プログラム。
    When the control device controls the controlled device with the execution module of the first version created by compiling using the first version of the program, the second version is edited by editing the first version of the program. Creating a version program and creating a second version execution module corresponding to the difference between the first version program and the second version program by compiling;
    When writing the execution module of the second version to the control device that is executing the execution module of the first version, the execution module being executed by the control device, the latest version of the program, and the latest version Information that is specific to the second version of the program and the second version of the execution module is transmitted to a management device that manages whether or not the program of the first version has been compiled. A transmission step of transmitting the second version of the program to the management device when not writing the second version of the execution module to the control device executing the execution module;
    To run on a computer,
    A programming support program characterized by that.
PCT/JP2018/020538 2018-05-29 2018-05-29 Program management system, programming assistance device, program management method, and programming assistance program WO2019229845A1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020207033266A KR102225850B1 (en) 2018-05-29 2018-05-29 Program management system, programming support device, program management method and programming support program
JP2018563933A JP6541902B1 (en) 2018-05-29 2018-05-29 Program management system, programming support apparatus, program management method, and programming support program
CN201880093762.7A CN112204479B (en) 2018-05-29 2018-05-29 Program management system, program support device, program management method, and program support program
PCT/JP2018/020538 WO2019229845A1 (en) 2018-05-29 2018-05-29 Program management system, programming assistance device, program management method, and programming assistance program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/020538 WO2019229845A1 (en) 2018-05-29 2018-05-29 Program management system, programming assistance device, program management method, and programming assistance program

Publications (1)

Publication Number Publication Date
WO2019229845A1 true WO2019229845A1 (en) 2019-12-05

Family

ID=67212125

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/020538 WO2019229845A1 (en) 2018-05-29 2018-05-29 Program management system, programming assistance device, program management method, and programming assistance program

Country Status (4)

Country Link
JP (1) JP6541902B1 (en)
KR (1) KR102225850B1 (en)
CN (1) CN112204479B (en)
WO (1) WO2019229845A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022239549A1 (en) 2021-05-14 2022-11-17 オムロン株式会社 Version management method, version management program, and version management system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113009873A (en) * 2021-02-03 2021-06-22 深圳市显控科技股份有限公司 Method for compiling and downloading PLC ladder diagram on line, PLC and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000010787A (en) * 1998-06-24 2000-01-14 Nec Corp Program down-loading device and its method
JP2013168031A (en) * 2012-02-15 2013-08-29 Fuji Electric Co Ltd Programmable controller system, support device thereof, and program
JP2016001376A (en) * 2014-06-11 2016-01-07 富士電機株式会社 Programmable controller system, and support device of the same
JP6305667B1 (en) * 2017-05-22 2018-04-04 三菱電機株式会社 Control device and editing device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4865634B2 (en) * 2007-05-14 2012-02-01 株式会社キーエンス Program editing support apparatus, computer program, program editing support method, and PLC system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000010787A (en) * 1998-06-24 2000-01-14 Nec Corp Program down-loading device and its method
JP2013168031A (en) * 2012-02-15 2013-08-29 Fuji Electric Co Ltd Programmable controller system, support device thereof, and program
JP2016001376A (en) * 2014-06-11 2016-01-07 富士電機株式会社 Programmable controller system, and support device of the same
JP6305667B1 (en) * 2017-05-22 2018-04-04 三菱電機株式会社 Control device and editing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022239549A1 (en) 2021-05-14 2022-11-17 オムロン株式会社 Version management method, version management program, and version management system

Also Published As

Publication number Publication date
JPWO2019229845A1 (en) 2020-06-25
CN112204479B (en) 2021-12-07
JP6541902B1 (en) 2019-07-10
KR20200140382A (en) 2020-12-15
CN112204479A (en) 2021-01-08
KR102225850B1 (en) 2021-03-11

Similar Documents

Publication Publication Date Title
JP4865634B2 (en) Program editing support apparatus, computer program, program editing support method, and PLC system
JP5039428B2 (en) Programmable controller and PLC system
US20180210415A1 (en) Support device, method, and recording medium whereon support program is stored
JP6786984B2 (en) Program processing equipment and programs
WO2015136970A1 (en) Control apparatus and control system
WO2019229845A1 (en) Program management system, programming assistance device, program management method, and programming assistance program
JP6969460B2 (en) Program development support system, program development support method and program development support program
CN111542790B (en) Method for processing software items
CN102473103B (en) The application program of controlling run is edited to carry out real-time scene figure
JP2009157533A (en) Programmable controller system
JP5849592B2 (en) Programmable controller system, programming device thereof, programmable controller, program, and debugging method
JP2016001376A (en) Programmable controller system, and support device of the same
JP5051377B2 (en) Operation specification management method for program development support device
JP6299095B2 (en) Shared data definition support system, its master device, local terminal, program
JP6205934B2 (en) Programmable controller system, its support device, program
JP6520241B2 (en) Control system, its management server device, support device
JP7067273B2 (en) Support equipment, control systems, and development support programs
JP6455096B2 (en) Control system, its support device, programmable control device
JP6119452B2 (en) Programmable controller system, its support device, programmable controller, program
JP2009098963A (en) Automatic module generation system
JP7151227B2 (en) Development system and support equipment
JP2009157534A (en) Programming support system, its programmable controller support device, and programmable indicator support device
WO2022269793A1 (en) Control device and address management method
WO2020208793A1 (en) Data generation device, data transfer method, and data transfer program
JP2004272629A (en) Device for programmable controller, and programmable updating method and program starting method for the same

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018563933

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18920335

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20207033266

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18920335

Country of ref document: EP

Kind code of ref document: A1