WO2019215919A1 - コンパイラおよびプログラミング支援装置 - Google Patents

コンパイラおよびプログラミング支援装置 Download PDF

Info

Publication number
WO2019215919A1
WO2019215919A1 PCT/JP2018/018352 JP2018018352W WO2019215919A1 WO 2019215919 A1 WO2019215919 A1 WO 2019215919A1 JP 2018018352 W JP2018018352 W JP 2018018352W WO 2019215919 A1 WO2019215919 A1 WO 2019215919A1
Authority
WO
WIPO (PCT)
Prior art keywords
global variable
memory address
program
memory
sequence program
Prior art date
Application number
PCT/JP2018/018352
Other languages
English (en)
French (fr)
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 US16/346,546 priority Critical patent/US10802808B2/en
Priority to CN201880004856.2A priority patent/CN110720081B/zh
Priority to DE112018000198.9T priority patent/DE112018000198T5/de
Priority to JP2018552266A priority patent/JP6452924B1/ja
Priority to PCT/JP2018/018352 priority patent/WO2019215919A1/ja
Publication of WO2019215919A1 publication Critical patent/WO2019215919A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/45Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
    • G06F8/458Synchronisation, e.g. post-wait, barriers, locks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13119Compiler

Definitions

  • the present invention relates to a compiler for compiling a sequence program including a declaration of a global variable and a programming support apparatus.
  • PLC Programmable Logic Controller
  • PLC Programmable Logic Controller
  • the sequence program is created and compiled by the programming device, and then written in the PLC.
  • Sequence programs may contain global variables that can be referenced from all sequence programs. This global variable is allocated to the memory area of the PLC by compilation. When the sequence program accesses a global variable, the memory address to which the global variable is assigned is referred to.
  • the information processing apparatus described in Patent Literature 1 allocates global variables to two locations, a public area and a work area.
  • the task updates the global variable using the work area, and the lower priority task refers to the global variable using the public area.
  • This information processing device secures simultaneity (also called consistency or consistency) when referring to global variables by switching between the work area and the public area when the global variable reference by the lower priority task is completed. is doing.
  • the present invention has been made in view of the above, and an object thereof is to obtain a compiler capable of suppressing the time required for compilation.
  • the present invention is a compiler that causes a computer to execute a process of generating a program to be executed by a control device by compiling a sequence program including declarations of global variables. If the memory address in the control device assigned to the global variable changes before and after editing the declaration of the global variable, the first value stored in the memory address assigned to the global variable before editing; Causes the computer to execute a process of giving an execution code that synchronizes the second value stored in the memory address assigned to the edited global variable to the execution program corresponding to the sequence program that refers to the edited global variable. It is characterized by that.
  • the compiler according to the present invention has an effect that the time required for compilation can be suppressed.
  • FIG. 1 is a block diagram showing a configuration of a programming device according to a first embodiment of the present invention.
  • 2 is a flowchart showing an outline of an operation procedure of the programming device according to the first embodiment.
  • the figure for demonstrating the declaration of the global variable concerning Embodiment 1 The figure which shows the example of the sequence program which refers to the global variable of FIG. The figure which shows the structure before the update of the memory allocation information concerning Embodiment 1.
  • FIG. The figure which shows the relationship between the execution program and reference destination memory address concerning Embodiment 1 before a global variable is edited.
  • the figure for demonstrating the example of the global variable declaration concerning Embodiment 1 after the global variable shown in FIG. 3 was edited
  • FIG. 6 is a flowchart showing a global variable assignment processing procedure by the programming device according to the first embodiment;
  • the figure which shows the relationship between the execution program and memory address of a reference destination concerning Embodiment 1 after a global variable is edited 3 is a flowchart showing a procedure for generating an execution program by the programming device according to the first embodiment;
  • FIG. 3 is a block diagram showing a configuration of a programming device according to the second embodiment. The figure for demonstrating the example of the global variable declaration concerning Embodiment 2 after the global variable shown in FIG.
  • FIG. 3 is a block diagram showing a configuration of a programming system according to the third embodiment.
  • 1 is a diagram illustrating a hardware configuration example of a programming device according to first to third embodiments.
  • FIG. 1 is a block diagram showing the configuration of the programming device according to the first exemplary embodiment of the present invention.
  • the programming device 10X that is a programming support device is a computer that supports creation of a sequence program included in the sequence program group 35X.
  • the programming device 10X compiles the sequence program included in the sequence program group 35X using the compiler 11X.
  • the programming device 10X is connected to the PLC 20, which is a control device.
  • the programming device 10X has a function of creating a sequence program group 35X and a global variable group 36X, a function of editing a sequence program included in the sequence program group 35X, and a function of editing a declaration of a global variable included in the global variable group 36X And have.
  • the programming device 10X has a function of generating an execution program 31 that can be executed by the PLC 20 by compiling the sequence program group 35X and the global variable group 36X.
  • the editing of the global variable in the present embodiment is not the process of changing the value of the global variable, but the editing of the declaration of the global variable.
  • the information for declaring the global variable includes a data type or attribute described later.
  • the programming device 10X includes a compiler 11X, an editing device 30, a communication unit 32, and a program storage unit 310.
  • the editing device 30 creates a sequence program group 35X and a global variable group 36X according to an instruction from the user, and edits the sequence program group 35X and the global variable group 36X according to an instruction from the user.
  • the editing device 30 stores a sequence program group 35X and a global variable group 36X that have been created or edited.
  • the editing device 30 may be configured independently of the programming device 10X. In this case, the editing device 30 is connected to the programming device 10X.
  • the sequence program group 35X includes a plurality of sequence programs such as sequence programs P and Q.
  • the global variable group 36X is a set of global variables used in the sequence program group 35X.
  • the global variable group 36X includes a plurality of global variables such as gVar1 to gVar4 described later.
  • Each global variable in the global variable group 36X is a variable having a global scope and can be referred to by a plurality of sequence programs in the sequence program group 35X. Accordingly, each global variable in the global variable group 36X can be referred to from a plurality of execution programs 31 written in the PLC 20.
  • the programming language specification of the sequence program group 35X is standardized by, for example, the International Electrotechnical Commission as IEC (International Electrotechnical Commission) 61131-3, and the sequence program group 35X can use variables that hold data. It is.
  • IEC International Electrotechnical Commission
  • As a programming language for describing the sequence program group 35X for example, in the IEC61131-3 standard, an instruction list, a structured text, a ladder diagram, a function block diagram, and a sequential function chart are defined. It is not limited.
  • the compiler 11X is a program that generates an execution program 31 that can be executed by the PLC 20.
  • the compiler 11X converts the sequence program group 35X and the global variable group 36X into the execution program 31 by compiling the sequence program group 35X and the global variable group 36X.
  • the compiler 11X can also compile only a part of the sequence programs included in the sequence program group 35X.
  • the compiler 11X includes a reference relationship management unit 12, a memory allocation unit 14, a program selection unit 17, and an execution program generation unit 16.
  • the reference relationship management unit 12 manages the reference relationship between the sequence program and the global variable.
  • the reference relationship management unit 12 creates reference relationship information 13 indicating the reference relationship between the sequence program and the global variable. Specifically, the reference relationship management unit 12 registers, in the reference relationship information 13, reference relationships between all sequence programs included in the sequence program group 35X and all global variables included in the global variable group 36X. .
  • the reference relationship management unit 12 edits the sequence program group 35X or the global variable group 36X, and changes the reference relationship between the sequence program included in the sequence program group 35X and the global variable included in the global variable group 36X. Updates the reference relationship information 13.
  • change presence / absence information indicating that any sequence program or global variable has been changed or added is added.
  • the reference relationship information 13 is added with change content information indicating the change content of the sequence program and the global variable.
  • the change content information is, for example, information in which a global variable is associated with an attribute after the change of the global variable. The attributes will be described later.
  • the reference relationship management unit 12 deletes the change presence / absence information and the change content information from the reference relationship information 13 for the sequence program and global variable that have been compiled.
  • the memory allocation unit 14 executes allocation of the PLC 20 to the data memory 24 or the non-volatile data memory 25 based on the reference relation information 13 for all global variables included in the global variable group 36X.
  • the memory allocation information 15 as a result is created.
  • the result of the allocation is the memory address of the data memory 24 or the nonvolatile data memory 25. Therefore, the memory allocation unit 14 registers the memory address of the data memory 24 or the nonvolatile data memory 25 in the memory allocation information 15.
  • the memory allocation unit 14 sets the memory address in the global variable and registers it in the memory allocation information 15.
  • the memory allocation unit 14 updates the memory allocation information 15 based on the reference relationship information 13 when the global variable group 36X is edited and the memory address allocated to the global variable changes. For example, the memory allocation unit 14 sets a memory address that is allowed for the attribute of the global variable.
  • the program selection unit 17 selects a sequence program to be compiled from the sequence program group 35X based on the change presence / absence information added to the reference relationship information 13. Note that the sequence program to be compiled may be selected by the editing apparatus 30 in accordance with an instruction from the user.
  • the program selection unit 17 selects all the sequence programs included in the sequence program group 35X as targets for compilation.
  • the execution program generation unit 16 uses the memory allocation information 15 and the sequence program selected from the sequence program group 35X by the program selection unit 17 to generate an execution program 31 to be operated by the PLC 20.
  • the execution program 31 includes an execution code that is an instruction sequence that can be interpreted and executed by the PLC 20.
  • the instruction sequence of the execution program 31 may be an instruction sequence of any format as long as it corresponds to the architecture of the PLC 20.
  • the execution program generation unit 16 stores the created execution program 31 in the program storage unit 310.
  • the program storage unit 310 is a memory that stores the execution program 31.
  • the communication unit 32 transmits the execution program 31 generated by the execution program generation unit 16 to the PLC 20.
  • the PLC 20 executes sequence control using the execution program 31 generated by the programming device 10X.
  • the PLC 20 includes a program memory 21, a communication unit 22, a program execution unit 23, a data memory 24, and a nonvolatile data memory 25.
  • the data memory 24 and the nonvolatile data memory 25 are memories that store variables referred to by the execution program 31 including global variables.
  • the data memory 24 is a volatile memory
  • the nonvolatile data memory 25 is a nonvolatile memory.
  • the communication unit 22 receives the execution program 31 transmitted from the communication unit 32 of the programming device 10 ⁇ / b> X and stores it in the program memory 21.
  • the program memory 21 is a memory that stores an execution program 31.
  • the program execution unit 23 reads the execution program 31 from the program memory 21 and executes instructions constituting the execution program 31.
  • the data memory 24 is a memory to which global variables used in the sequence program group 35X have no power failure retention attribute.
  • the non-volatile data memory 25 is a non-volatile memory to which global variables used in the sequence program group 35X are assigned those having a power failure retention attribute.
  • the power failure retention attribute is an attribute for designating that data is retained without being lost even when a power failure occurs. Therefore, the global variable in which the power failure retention attribute is set is a global variable that retains data without disappearing even when a power failure occurs.
  • the global variable having a power failure retention attribute is, for example, a global variable having a RETAIN attribute in the IEC61131-3 standard, but the representation of the power failure retention attribute is not limited to the RETAIN attribute.
  • a memory access instruction for referring to the data memory 24 and the non-volatile data memory 25 included in the execution program 31 is expressed as follows. write (X, Ax): The value of “X” is written in the area of the memory address Ax. read (Ay, Y): Reads the value of the area of the memory address Ay and writes it in the area of “Y”.
  • “X” indicates a value written to the area of the memory address Ax by a write instruction (write instruction), and “Y” is read from the area of the memory address Ay by a read instruction (read instruction). Indicates the area where the written value is written.
  • “X” and “Y” may be values indicated in any format as long as they correspond to the architecture of the PLC 20.
  • the reference to the data memory 24 is realized by executing a write instruction or a read instruction when the memory address Ax or the memory address Ay is within the memory address range of the data memory 24.
  • the reference to the nonvolatile data memory 25 is realized by executing a write instruction or a read instruction when the memory address Ax or the memory address Ay is within the memory address range of the nonvolatile data memory 25.
  • the memory address Ax and the memory address Ay may be any type of memory address as long as it corresponds to the architecture of the PLC 20.
  • FIG. 2 is a flowchart illustrating an outline of an operation procedure of the programming device according to the first embodiment.
  • the editing device 30 creates a sequence program group 35X and a global variable group 36X in accordance with an instruction from the user (step S10).
  • the reference relationship management unit 12 creates reference relationship information 13 indicating the reference relationship between the sequence program in the sequence program group 35X and the global variable in the global variable group 36X.
  • the memory allocation unit 14 allocates a memory address to a global variable in the global variable group 36X. Further, the memory allocation unit 14 creates the memory allocation information 15 based on the memory address allocated to the global variable and the reference relation information 13 (step S20).
  • the execution program generation unit 16 generates an execution program 31 for all the sequence programs included in the sequence program group 35X (step S30). Specifically, the execution program generation unit 16 generates an execution program 31 using the created sequence program group 35X and global variable group 36X. Then, the communication unit 32 transmits the generated execution program 31 to the PLC 20 (step S40). As a result, the PLC 20 can execute the execution program 31.
  • the editing device 30 edits a part of the global variable group 36X and a part of the sequence program group 35X in accordance with an instruction from the user. That is, the editing device 30 edits the sequence program and global variable declaration in accordance with an instruction from the user (step S50).
  • the global variables include gVar1, gVar2, gVar3, and gVar4.
  • the attributes of gVar1 are changed by editing, and gVar2, gVar3, and gVar4 are not changed.
  • the sequence program group 35X is the sequence programs P and Q
  • the sequence program P is edited simultaneously with the editing of gVar1
  • the memory address of the write destination and the read source of gVar1 is changed
  • the reference relationship management unit 12 updates the reference relationship information 13, and the memory allocation unit 14 updates the memory allocation information 15 (step S60). Specifically, the reference relationship management unit 12 updates the change presence / absence information and the change content information in the reference relationship information 13. The memory allocation unit 14 newly allocates a reference destination memory address to gVar1 of the sequence program P in the memory allocation information 15 based on the reference relation information 13.
  • the program selection unit 17 selects the sequence program P to be compiled from the sequence program group 35X based on the reference relation information 13.
  • the sequence program P selected by the program selection unit 17 is a sequence program that refers to a global variable whose allocation destination memory address has been changed. Therefore, the execution program generation unit 16 generates an execution program for the sequence program that refers to the global variable whose allocation destination memory address has been changed (step S70).
  • an execution program generated using the sequence program P is referred to as an execution program EP.
  • the execution program generation unit 16 includes the sequence program P in which the memory address to which the global variable to be referenced is assigned is changed among the sequence program group 35X including the plurality of sequence programs P and Q. Compile only for.
  • the communication unit 32 transmits the generated execution program EP to the PLC 20 (step S80). As a result, the PLC 20 replaces the old execution program 31 corresponding to the execution program EP with the received execution program EP.
  • FIG. 3 is a diagram for explaining the declaration of the global variable according to the first embodiment.
  • FIG. 3 shows an example of global variable declaration in accordance with the global variable declaration method in the IEC61131-3 standard.
  • the global variable declaration 361 corresponds to the global variable group 36X in the programming device 10X.
  • gVar1 is declared as an INT-type global variable
  • gVar2 is declared as a REAL-type global variable with an initial value of 10.0
  • gVar3 is declared as an INT-type global variable with a power failure retention attribute.
  • Data types such as INT type, REAL type, and WORD type indicate the meaning of the data size of global variables, for example.
  • INT type INT type
  • REAL type REAL type
  • WORD type indicate the meaning of the data size of global variables, for example.
  • a global variable before editing and a global variable after editing have the same data type, and the data size that can be set in the global variable is the same before and after editing.
  • the global variable declaration method in the present embodiment is not limited to the format shown in FIG.
  • FIG. 4 is a diagram showing an example of a sequence program that refers to the global variable in FIG.
  • FIG. 4 shows an example of a sequence program defined by structured text in the IEC61131-3 standard.
  • the sequence program group 35X shown in FIG. 4 includes sequence programs 111P and 111Q.
  • the sequence program 111P is an example of the sequence program P before change
  • the sequence program 111Q shown in FIG. 4 is an example of the sequence program Q before change.
  • sequence program 111P “P1” is written to the global variable gVar1, and then the value of the global variable gVar1 is read to “P2”. Similarly, the sequence program 111Q writes “Q1” to the global variable gVar1, and then reads the value of the global variable gVar1 to “Q2”.
  • references to global variables other than gVar1 are omitted. The reference to the global variable is not limited to the format shown in FIG.
  • the memory allocation unit 14 allocates gVar1 and gVar2 to the data memory 24 and allocates gVar3 and gVar4 to the nonvolatile data memory 25 based on the global variable declaration 361.
  • FIG. 5 is a diagram of a configuration before updating the memory allocation information according to the first embodiment.
  • FIG. 5 shows a configuration example of the memory allocation information 151 created by the memory allocation unit 14 based on the global variable declaration 361.
  • the memory allocation information 151 is an example of the memory allocation information 15.
  • the memory allocation information 151 holds a memory address allocated to the data memory 24 or the nonvolatile data memory 25.
  • the memory allocation information 151 is information indicating a correspondence relationship between a global variable in the global variable group 36X, a memory address to which the global variable is allocated, and a sequence program that refers to the memory address.
  • gVar1, gVar2, gVar3, and gVar4 are registered as variable names of global variables.
  • the data type, type, attribute, initial value, memory address, and reference program are associated with each global variable.
  • the data type indicates the type of global variable data such as INT type, REAL type, and WORD type, the type indicates the scope or usage of the variable, and the attribute indicates the nature of the variable such as power outage retention or constant.
  • VAR_GLOBAL indicating a global variable is registered in each global variable
  • RETAIN is registered in a global variable having a power failure retention attribute.
  • the initial value is the initial value of the global variable.
  • the memory address indicates the memory address assigned to the global variable
  • the reference program indicates a sequence program that refers to the memory address.
  • “Aa”, “Ab”, “Ac”, and “Ad” indicating the memory addresses Aa, Ab, Ac, and Ad are registered in the memory address.
  • “P” in the reference program indicates the sequence program P
  • “Q” indicates the sequence program Q.
  • the reference programs here are a sequence program 111P and a sequence program 111Q.
  • gVar1 is assigned to the memory address Aa of the data memory 24
  • gVar2 is assigned to the memory address Ab of the data memory 24
  • gVar3 is assigned to the memory address Ac of the nonvolatile data memory 25
  • gVar4 is nonvolatile data. This indicates that the memory address Ad of the memory 25 has been assigned.
  • the format of the memory allocation information 15 is not limited to the format shown in FIG.
  • the reference relationship information 13 indicates that gVar1, gVar2, gVar3, and gVar4 are referenced from the sequence programs 111P and 111Q, respectively.
  • the memory allocation information 151 created using the reference relationship information 13 also indicates that gVar1, gVar2, gVar3, and gVar4 are referenced by the sequence program 111P and the sequence program 111Q.
  • FIG. 6 is a diagram illustrating a relationship between an execution program and a reference destination memory address according to the first embodiment before a global variable is edited.
  • FIG. 6 shows an image in which global variables before editing are assigned to the data memory 24 or the nonvolatile data memory 25.
  • Write of the execution program EP51 is an instruction for executing writing of “P1” to the memory address Aa to which gVar1 is assigned, and read reads the value of the memory address Aa to which gVar1 is assigned and writes it to “P2”. This is an instruction to execute writing. These mean that “P1” is written to gVar1 and the value read from gVar1 is written to “P2” in the sequence program 111P that is the source program of the execution program EP51.
  • write in the execution program EQ51 is an instruction for executing writing of “Q1” to the memory address Aa to which gVar1 is assigned, and read reads out the value of the memory address Aa to which gVar1 is assigned and reads “Q2”. It is an instruction to execute writing to.
  • reference to global variables other than gVar1 is omitted.
  • FIG. 7 is a diagram for explaining an example of the global variable declaration according to the first embodiment after the global variable shown in FIG. 3 is edited.
  • a global variable declaration 362 in the case where gVar1 is changed to have a power failure holding attribute with respect to the global variable declaration 361 shown in FIG. 3 is shown.
  • gVar1 declared in FIG. 3 is deleted by being treated as a comment, and gVar1 is declared as a global variable having a power failure retention attribute.
  • FIG. 8 is a diagram for explaining an example of the sequence program after the sequence program shown in FIG. 4 is edited.
  • the sequence program group 35X shown in FIG. 8 includes sequence programs 112P and 111Q.
  • a sequence program 112P shown in FIG. 8 is an example of the sequence program P after the change.
  • sequence program 111P shown in FIG. 4 is changed to the sequence program 112P shown in FIG. 8 together with the above-described editing of gVar1. That is, it is assumed that the value written to gVar1 is changed from “P1” to “P3”, and the area where the value of gVar1 is read and written is changed from “P2” to “P4”. Note that the sequence program 111Q shown in FIG. 8 is not changed.
  • FIG. 9 is a diagram illustrating a configuration after updating the memory allocation information according to the first embodiment.
  • FIG. 9 shows a configuration example of the memory allocation information 152 created by the memory allocation unit 14 based on the global variable declaration 362.
  • the memory allocation information 152 is an example of the memory allocation information 15.
  • the memory allocation information 152 is created by the memory allocation unit 14 updating the memory allocation information 151 when the global variable declaration 361 is changed to the global variable declaration 362 and the sequence program 111P is changed to the sequence program 112P.
  • the Therefore, the reference programs here are the sequence program 112P and the sequence program 111Q.
  • the memory allocation information 152 holds a memory address allocated to the data memory 24 or the nonvolatile data memory 25.
  • the location of gVar1 is edited. Therefore, in the memory allocation information 152, the item corresponding to gVar1 is updated as compared with the memory allocation information 151.
  • the memory allocation unit 14 newly allocates a memory address Ae to gVar1 will be described.
  • the memory address item to be assigned is registered with the memory address before editing gVar1 and the memory address after editing gVar1. Specifically, a memory address Aa that is a memory address before editing gVar1 and a memory address Ae that is a memory address after editing gVar1 are registered at the memory address corresponding to gVar1. .
  • the reference program location of gVar1 is associated with the sequence program Q, which is the first program associated with the memory address Aa before editing gVar1, and the memory address Ae after editing gVar1.
  • a sequence program P which is a second program, is registered.
  • the memory allocation information 152 information indicating that the memory address Aa referred to by the sequence program Q in the gVar1 has been changed to the memory address Ae is registered. This information indicates that the value of the memory address Aa and the value of the memory address Ae need to be synchronized.
  • FIG. 10 is a flowchart of the global variable assignment processing procedure performed by the programming device according to the first embodiment.
  • the memory allocation unit 14 determines whether there is a global variable in the edited global variable group 36X (step S100). In other words, the memory allocation unit 14 determines whether a global variable is declared.
  • step S110 the memory allocation unit 14 acquires a global variable to be allocated a memory address (step S110).
  • This process is a process for acquiring, from the global variable group 36X, a global variable to be allocated, that is, a global variable edited before compilation. Specifically, the memory allocation unit 14 acquires a global variable that requires a new allocation of a memory address by editing from the global variable group 36X.
  • the memory allocation unit 14 determines whether an allocation destination memory address is set in the acquired global variable (step S120).
  • the global variable to which this memory address is set is an existing one.
  • a global variable to be assigned a memory address is a global variable that has been edited to an existing global variable. For this reason, the memory allocation unit 14 newly allocates a memory address while maintaining the memory address of the existing allocation destination. Therefore, a registration area that is a registration destination for registering a new memory address is stored in the memory allocation information 152. Create (step S130).
  • the registered area in the memory allocation information 15 may be any area as long as it corresponds to the memory allocation information 15.
  • the memory allocation unit 14 registers the reference program for the newly created registration area (step S140).
  • the memory allocation unit 14 here identifies the reference program by referring to the reference relation information 13 and registers the identified reference program in the memory allocation information 152.
  • the memory allocation unit 14 determines the memory address of the global variable to be compiled and registers it in the created registration area (step S150).
  • step S120 determines whether the memory address is set in step S120 (step S120, No).
  • the memory allocation unit 14 determines the memory address of the allocation destination and registers it in the memory allocation information 152 (step S150).
  • any method may be applied as long as it is a method according to the architecture of the PLC 20.
  • the memory allocation unit 14 determines whether there are any global variables remaining in the global variable group 36X, that is, whether there are any global variables that need to be allocated (step S100).
  • step S100 If there is a global variable (step S100, Yes), the above-described steps S110 to S150 and step S100 are repeated. On the other hand, when there is no global variable (No at Step S100), the memory allocation unit 14 ends the allocation process. That is, when the allocation of memory addresses is completed for all global variables, the memory allocation unit 14 ends the allocation process.
  • the memory addresses of the allocation destinations can be set for all global variables.
  • a plurality of memory addresses to be assigned can be set for the edited global variable.
  • the memory address Ae and the sequence program P that is a reference program are registered in the present embodiment for gVar1 of the memory allocation information 152 by the processing described with reference to FIG. Thereafter, the execution program generating unit 16 creates an execution program EP using the memory allocation information 152 for the sequence program 112P edited from the sequence program 111P.
  • FIG. 11 is a diagram illustrating a relationship between an execution program and a reference destination memory address according to the first embodiment after the global variable is edited.
  • FIG. 11 shows an image in which the edited global variable is assigned to the data memory 24 or the nonvolatile data memory 25.
  • the relationship among the execution program EP52 generated by compiling the sequence program 112P, the created execution program EQ51, the data memory 24, and the nonvolatile data memory 25 is shown.
  • reference to global variables other than gVar1 is omitted.
  • sequence program 111P is edited to create the sequence program 112P, but the sequence program 111Q is not edited. Therefore, the sequence program 112P is compiled, and the sequence program 111Q does not need to be compiled.
  • “write” of the execution program EP52 is an instruction for executing the writing of “P3” to the memory address Ae to which gVar1 is assigned, and “read” reads the value of the memory address Ae to which gVar1 is assigned. This is an instruction to execute writing to “P4”.
  • gVar1 referred to by the execution program EP52 updated by editing is assigned to the memory address Ae in the nonvolatile data memory 25, and gVar1 referred to by the execution program EQ51 not edited is the data memory.
  • the allocation to the memory address Aa in 24 is maintained. In this way, assignment of global variables after editing is executed while maintaining the assignment destination of global variables before editing.
  • the reference of gVar1 of the sequence program 112P to be compiled is realized as a reference to the memory address Ae in the nonvolatile data memory 25 newly allocated to gVar1. That is, in the execution program EP52, an execution code is given as writing to the gVar1 as writing to the memory address Ae and reading from the gVar1 as reading to the memory address Ae.
  • the execution program generation unit 16 stores the value stored in the memory address Aa before the change and the memory address Ae after the change with respect to the instruction that references the newly allocated global variable. Insert an instruction to synchronize with the value being Specifically, the execution program generation unit 16 inserts a copy (Bc, Bd) instruction (copy instruction) immediately after write and immediately before read. copy (Bc, Bd): Write the value of the memory address Bc in the area of the memory address Bd.
  • FIG. 11 shows a case where one of Bc and Bd is Ae and the other is Aa.
  • the copy inserted here is an instruction that operates inseparably from the immediately preceding write or immediately following read.
  • the copy (Ae, Aa) instruction is inserted immediately after the write (P3, Ae).
  • this copy (Ae, Aa) is executed, the value of gVar1 assigned to the memory address Ae of the non-volatile data memory 25 is copied and written to gVar1 assigned to the memory address Aa of the data memory 24. (S1).
  • a copy (Aa, Ae) command is inserted immediately before read (Ae, P4).
  • this copy (Aa, Ae) is executed, the value of gVar1 assigned to the memory address Aa of the data memory 24 is copied and written to gVar1 assigned to the memory address Ae of the nonvolatile data memory 25. (S2).
  • the value of gVar1 referred to in the sequence program 112P and the value of gVar1 referred to in the sequence program 111Q become the same value.
  • FIG. 12 is a flowchart of an execution program generation process procedure performed by the programming device according to the first embodiment.
  • the execution program generation unit 16 executes the processing of steps S200 to S280 for each specific unit for the sequence program 112P to be compiled.
  • the specific unit of the sequence program 112P may be any unit as long as it corresponds to the programming language describing the sequence program 112P.
  • An example of the specific unit is one line of the sequence program 112P.
  • the execution program generation unit 16 generates an execution code that can be executed by the PLC 20 for a specific unit of the sequence program 112P (step S200). When a global variable appears when generating the execution code, the execution program generation unit 16 sets a memory address as an allocation destination to an arbitrary value.
  • the execution program generation unit 16 determines whether or not the specific unit to be compiled includes a global variable (step S210). Specifically, the execution program generation unit 16 determines whether or not the specific unit used in step S200 includes a global variable.
  • the execution program generation unit 16 acquires a memory address that matches the reference program to be compiled and determines an execution code (step S220).
  • the execution program generation unit 16 is based on the memory allocation information 152, and the memory associated with the sequence program P to be compiled out of the memory addresses Aa and Ae of the allocation destination of gVar1 to be compiled. An address Ae is acquired. In other words, the execution program generation unit 16 acquires a memory address assigned to a global variable to be compiled that is associated with a reference program to be compiled.
  • the execution program generation unit 16 replaces the global variable allocation destination memory address, which has been set to an arbitrary value in step S200, with the acquired memory address, and determines an execution code corresponding to the replaced memory address. Thereby, even when a global variable is assigned to a plurality of memory addresses, a memory address referred to by a sequence program to be compiled can be set.
  • the execution program generation unit 16 determines whether or not a plurality of memory addresses are assigned to the global variable to be compiled (step S230). When a plurality of memory addresses are assigned like the memory addresses Aa and Ae (step S230, Yes), the execution program generation unit 16 executes the execution program EP52 in order to store the same value between the memory addresses Aa and Ae. Create a copy command inside.
  • the execution program generation unit 16 determines whether or not the instruction generated in the execution program EP52 is write (step S240). When the instruction already generated in the execution program EP52 is write (step S240, Yes), the execution program generation unit 16 inserts copy immediately after the write (step S250). Here, the execution program generation unit 16 sets the memory address of the value acquisition source by copy as the memory address Ae acquired in step S ⁇ b> 220, and sets the memory address of the value write destination by copy based on the memory allocation information 152. At this time, the execution program generation unit 16 selects a memory address Aa other than the memory address Ae acquired in step S220 among the memory addresses Aa and Ae determined to be assigned a plurality of memory addresses in step S230. Set the value to be written by copy. When there are a plurality of memory addresses in this way, the execution program generating unit 16 inserts a copy in the execution program EP52 by the number of memory addresses.
  • step S260 the execution program generation unit 16 determines whether the instruction already generated in the execution program EP52 is read. If the generated instruction in the execution program EP52 is read (step S260, Yes), the execution program generation unit 16 inserts copy immediately before the read (step S270).
  • the execution program generation unit 16 sets the memory address Aa from which the value is acquired by copying and the memory address Ae to which the value is written by copying, in the same manner as in step S250.
  • the execution program generation unit 16 performs the process of step S280 after the process of step S250 or step S270.
  • step S260 if the instruction already generated in the execution program EP52 is not read (No in step S260), the copy instruction is not necessary. In this case, the execution program generating unit 16 performs the process of step S280 without inserting a copy command.
  • step S230 when a plurality of memory addresses are not assigned (No in step S230), the global variable to be compiled is assigned to a single memory address, so that a copy instruction is not necessary. In this case, the execution program generation unit 16 performs the process of step S280 without inserting a copy command.
  • step S210 when the compilation target does not include a global variable (step S210, No), the execution program generation unit 16 performs the process of step S280 without inserting a copy instruction.
  • Step S280 the execution program generation unit 16 determines whether or not there remains a compilation target.
  • the execution program generation unit 16 repeats the processing of steps S200 to S280 for each specific unit of the sequence program 112P, and therefore determines whether or not the specific unit to be compiled remains in the sequence program 112P. That is, the execution program generation unit 16 determines whether there is a specific unit that has not been subjected to the processing of steps S200 to S280 among the compilation targets.
  • step S280, Yes the execution program generation unit 16 repeats the processing from step S200 to S280 for the specific unit in the remaining compilation target.
  • step S280, No the execution program generation unit 16 ends the generation process of the execution program EP52.
  • the execution program generation unit 16 synchronizes the values held at the plurality of memory addresses between the memory addresses by copying, so that the value of the global variable referred to by the plurality of sequence programs 112P and 111Q is the only value. It can be.
  • the memory address to which the global variable is assigned is changed when the global variable is updated. You need to compile the whole program.
  • the programming device 10X of the present embodiment can limit the compilation target to the sequence program 112P in which the memory address of the allocation destination is changed.
  • a case has been described in which global variables are synchronized with a plurality of instructions by inserting copy immediately after write. However, instead of copy and write, a simple operation for executing copy and write is performed. One instruction may be inserted.
  • a case has been described in which global variables are synchronized by a plurality of instructions by inserting copy immediately before read. However, instead of read and copy, read and copy are executed. A single instruction may be inserted.
  • the programming device 10X may be configured with a single instruction or a plurality of instructions.
  • the value held at the memory address Aa that is the allocation destination from before the editing is synchronized with the copy command.
  • the unedited sequence program 111Q assigned to the memory address Aa before the global variable is edited can be excluded from the compilation targets. Therefore, it is possible to suppress the processing time for compiling the sequence program.
  • the PLC 20 can execute the sequence control using the execution program EQ51 corresponding to the unedited sequence program 111Q as it is. Therefore, when the execution program EP52 is written to the PLC 20, writing of the execution program EQ51 to the PLC 20 can be omitted.
  • Embodiment 2 a second embodiment of the present invention will be described with reference to FIGS.
  • the sequence program is compiled by a compiling method set by the user. Further, when a specific compiling method is selected, even if the data size that can be set in the global variable before and after editing is different, the instruction of the first embodiment is used by using an instruction that executes data type conversion. Assign global variables to multiple memory addresses.
  • FIG. 13 is a block diagram of the configuration of the programming device according to the second embodiment.
  • the constituent elements in FIG. 13 that achieve the same functions as those of the programming device 10X of the first embodiment shown in FIG.
  • the programming device 10Y which is a programming support device, differs from the programming device 10X in that it includes a compile option determination unit 18 that selects a compile method based on the compile option 41.
  • the programming device 10Y includes a compiler 11Y, an editing device 30, a communication unit 32, and a program storage unit 310.
  • the compiler 11Y includes a compile option determination unit 18 in addition to the components of the compiler 11X.
  • the compile option 41 is information for selecting a compile method.
  • the compile option 41 either the first option or the second option is set.
  • the first option is indicated by a value indicating a compilation method for assigning a unique memory address to each global variable
  • the second option is indicated by a value indicating a compilation method for assigning a plurality of memory addresses to each global variable. It is. Therefore, the compile option 41 stores a value indicating the first option or a value indicating the second option in advance by the user.
  • global variables can be assigned to a plurality of memory addresses, and the sequence program to be compiled is limited. Note that the values of global variables assigned to a plurality of memory addresses may not match between sequence programs that reference them.
  • the compile option determination unit 18 determines, based on the compile option 41, whether to compile using the method specified by the first option or to execute compile using the method specified by the second option.
  • the compile option determination unit 18 uses, as the determination result, the first instruction information specifying the first option or the second instruction information specifying the second option, the memory allocation unit 14, the program selection unit 17, and the execution It transmits to the program generation part 16.
  • the memory allocation unit 14, the program selection unit 17, and the execution program generation unit 16 execute processing according to the first instruction information or the second instruction information from the compile option determination unit 18. Specifically, when the memory allocation unit 14 receives the first instruction information from the compile option determination unit 18, the memory allocation unit 14 allocates a unique memory address to each global variable. In addition, when the memory allocation unit 14 receives the second instruction information from the compile option determination unit 18, the memory allocation unit 14 allocates a memory address to the global variable by the same method as in the first embodiment.
  • the program selection unit 17 selects all the sequence programs that refer to the global variable whose allocation destination memory address is changed.
  • the program selection unit 17 selects a sequence program by the same method as in the first embodiment.
  • the execution program generation unit 16 when the execution program generation unit 16 receives the first instruction information from the compile option determination unit 18, the execution program generation unit 16 compiles all the sequence programs that reference the global variable whose allocation destination memory address has been changed.
  • the execution program generation unit 16 when the execution program generation unit 16 receives the second instruction information from the compile option determination unit 18, the execution program generation unit 16 compiles the sequence program by the same method as in the first embodiment.
  • the execution program generation unit 16 generates an execution program that does not insert copy in the first embodiment, and in the case of the second option, instead of the copy instruction generated in the first embodiment, Generate instructions to perform data type conversion.
  • FIG. 14 is a diagram for explaining an example of the global variable declaration according to the second embodiment after the global variable shown in FIG. 3 is edited.
  • a global variable declaration 363 when the data type of gVar1 is changed with respect to the global variable declaration 361 shown in FIG.
  • the global variable declaration 363 it is assumed that gVar1 declared in FIG. 3 is deleted as an instruction by being treated as a comment, and gVar1 is declared as a global variable whose data type is REAL.
  • the INT type is a 16-bit signed integer
  • the REAL type is a 32-bit single precision floating point number. Note that the data types shown here are examples, and other data types may be applied.
  • the data size required by each data type differs depending on the data type, such as the INT type and REAL type of the IEC61131-3 standard, so the amount of memory allocated to the global variable differs for each data type. For this reason, in this embodiment, when a global variable has a plurality of allocation destinations by editing the data type, the data size of each allocation destination may be different.
  • the process corresponding to the copy described in the first embodiment must be a process that can synchronize values of compatible data types.
  • the copy source value and the copy destination value may not always match.
  • data that exceeds the range of values that can be taken with a data type with a small data size cannot be copied correctly to a data type with a small data size. .
  • the user can compile with the compile method desired by the user. Execute.
  • the execution program generation unit 16 uses the REAL in place of the copy immediately after the write in the execution program EP52 shown in FIG.
  • the following REAL2INT (Cc, Cd) instruction for converting the type to the INT type is inserted.
  • INT2REAL (Cc, Cd) The INT type value of the memory address Cc is written as the REAL type in the area of the memory address Cd.
  • the execution program generation unit 16 uses the instruction to write the value after converting the data type, and the value held at the memory address that is the allocation destination from before editing and the memory that is the allocation destination after editing. Synchronize with the value held in the address.
  • the REAL2INT and INT2REAL described above are realized by either a single instruction or a group of instructions composed of a plurality of instructions according to the architecture of the PLC 20. However, these instructions are executed inseparably from write immediately before REAL2INT or read immediately after INT2REAL.
  • FIG. 15 is a diagram illustrating a relationship between an execution program and a reference destination memory address according to the second embodiment after the global variable is edited.
  • FIG. 15 shows an image in which global variables are allocated to the data memory 24 or the nonvolatile data memory 25 according to the second option.
  • the sequence program 111P is edited to create the sequence program 112P, and the sequence program 111Q is not edited.
  • the second option it is the sequence program 112P that is compiled, and the sequence program 111Q does not need to be compiled.
  • gVar1 of the execution program EP53 updated by editing is assigned to the memory address Ae in the data memory 24, and gVar1 of the execution program EQ51 not edited is assigned to the memory address Aa in the data memory 24. Allocation to is maintained. As described above, in this embodiment, as in the first embodiment, assignment of global variables after editing is executed while maintaining the assignment destination of global variables before editing.
  • the copy immediately after the write in FIG. 11 in the first embodiment is REAL2INT in the present embodiment
  • the copy immediately before the read in FIG. 11 in the first embodiment is INT2REAL in the present embodiment.
  • REAL2INT the value written as REAL type in the write to the memory address Ae referred to by the execution program EP53 is synchronized as the INT type to the memory address Aa referred to by the execution program EQ51 (s3). That is, the value of the memory address Ae is copied by REAL2INT, and the data type is converted and written to the memory address Aa.
  • the value read as INT type by read to the memory address Aa referred to by the execution program EQ51 by INT2REAL is synchronized as REAL type to the memory address Ae referred to by the execution program EP53 (s4). That is, the value of the memory address Aa is copied by INT2REAL, and the data type is converted and written to the memory address Ae.
  • REAL2INT and INT2REAL which are instructions for executing data type conversion exemplified in the present embodiment, are any instructions as long as they are in accordance with the data type usable in the sequence program and the architecture of PLC 20. May be.
  • the user can select the first option and the second option by the compile option 41.
  • the value held at the memory address Aa which is the allocation destination from before editing
  • the value held at the memory address Ae the allocation destination after editing
  • Embodiment 3 FIG. Next, Embodiment 3 of the present invention will be described with reference to FIG. In the third embodiment, when a plurality of programming devices are connected to the PLC 20, a specific programming device compiles a specific sequence program.
  • FIG. 16 is a block diagram of a configuration of a programming system according to the third embodiment.
  • the constituent elements in FIG. 16 that achieve the same functions as those of the programming device 10X of the first embodiment shown in FIG.
  • the programming system 1 which is a programming support system, includes programming devices 10A and 10B and a PLC 20.
  • the programming devices 10A and 10B have the same function as the programming device 10X.
  • at least one of the programming devices 10A and 10B may be a device having the same function as the programming device 10Y.
  • the programming devices 10A and 10B are connected to the PLC 20 so that the programming devices 10A and 10B can transmit and receive information via the PLC 20.
  • the programming devices 10 ⁇ / b> A and 10 ⁇ / b> B may be directly connected or may be connected via a device other than the PLC 20.
  • the global variable group 36X created by the programming device 10A and the memory allocation information 15 are copied to the programming device 10B by the following method (1-a) or (1-b).
  • An example of the global variable group 36X copied from the programming device 10A to the programming device 10B is a global variable declaration 361.
  • the memory allocation information 15 copied from the programming device 10A to the programming device 10B includes an allocation destination memory address and information indicating a reference program.
  • the programming device 10A stores information indicating that the memory allocation information 15 has been created by the programming device 10A in association with a global variable in the memory allocation information 15. Keep it.
  • the programming device 10A transmits a file storing the global variable group 36X and the memory allocation information 15 to the programming device 10B.
  • the communication unit 32 which is an acquisition unit, receives a file from the programming device 10A.
  • the programming devices 10A and 10B may transmit and receive the global variable group 36X and the memory allocation information 15 by any method such as copying on a network or sending by mail.
  • the programming device 10A writes the global variable group 36X and the memory allocation information 15 to the PLC 20.
  • the communication unit 32 as an acquisition unit reads the global variable group 36X and the memory allocation information 15 written in the PLC 20 by the programming device 10A from the PLC 20.
  • the PLC 20 stores the global variable group 36X and the memory allocation information 15 even after the written global variable group 36X and the memory allocation information 15 are read to the programming device 10B.
  • the programming device 10B uses the global variable group 36X copied by the above method (1-a) or (1-b) to execute a sequence program by the following method (2-a) or (2-b). At the same time, the global variable declaration 361 is changed.
  • the programming device 10B creates a sequence program by updating at least a part of the sequence program group 35X created by the programming device 10A with the editing device 30.
  • the programming devices 10A and 10B copy the sequence program group 35X created by the programming device 10A to the programming device 10B by the same method as the above (1-a) or (1-b).
  • the programming device 10B creates a new sequence program using the editing device 30.
  • the editing device 30 of the programming device 10B changes the global variable declaration 361 based on the sequence program created by the method (2-a) or (2-b).
  • the execution program generation unit 16 of the programming device 10B compiles the sequence program created by the method (2-a) or (2-b) and the changed global variable.
  • the execution program generation unit 16 of the programming device 10B executes the compilation by the same method as in the first or second embodiment if there is a change in the memory address to which the existing global variable is allocated. To do. That is, the execution program generation unit 16 of the programming device 10B generates an execution program EP by inserting an instruction for synchronizing the value of the global variable with the new memory address while holding the original memory address. .
  • the memory allocation unit 14 of the programming device 10B updates the memory allocation information 15.
  • the processing by the programming device 10B can be performed without affecting the programming device 10A by executing the above-described processing.
  • the programming device 10B can execute processing such as change or creation of a sequence program without affecting the programming device 10A.
  • the programming device 10A does not require compilation, and the programming system 1 can suppress the compilation processing time. For example, compared with the case where compilation is executed by the programming device 10A and the programming device 10B, the total compilation time is shorter when the compilation is executed only by the programming device 10B.
  • the global variable declaration 361 shown in FIG. 3 exists in both programming devices 10A and 10B, the sequence program 111P shown in FIG. 4 exists only in the programming device 10B, and the sequence program 111Q shown in FIG. 4 includes only the programming device 10A.
  • only the programming device 10B may change the global variable declaration 361 to the global variable declaration 362 shown in FIG. 7 and change the sequence program 111P to the sequence program 112P shown in FIG.
  • the compiling and writing to the PLC 20 are executed only by the programming device 10B, and the compiling and writing to the PLC 20 are not executed by the programming device 10A, so that the state in the PLC 20 becomes as shown in FIG.
  • the programming device 10B executes processing such as change or creation of a sequence program without affecting the programming device 10A, so that compilation in the programming device 10A becomes unnecessary.
  • the programming system 1 can suppress the compilation processing time.
  • the hardware configuration of the programming devices 10X and 10Y will be described. Since the programming devices 10X and 10Y have the same hardware configuration, the hardware configuration of the programming device 10X will be described here.
  • FIG. 17 is a diagram of a hardware configuration example of the programming device according to the first to third embodiments.
  • the programming device 10X can be realized by the control circuit 300 shown in FIG. 17, that is, the processor 301, the memory 302, the communication device 304, and the input device 303.
  • Examples of the processor 301 are a CPU (Central Processing Unit, a central processing unit, a processing unit, an arithmetic unit, a microprocessor, a microcomputer, a processor, and a DSP) or a system LSI (Large Scale Integration).
  • An example of the memory 302 is a RAM (Random Access Memory) or a ROM (Read Only Memory).
  • An example of the input device 303 is a keyboard, a mouse, or a touch panel.
  • the communication device 304 realizes the function of the communication unit 32.
  • the programming device 10X is realized by the processor 301 reading out and executing the compiler 11X and the editing program for executing the operation of the editing device 30 from the memory 302. It can be said that the compiler 11X, which is a compile program, causes the computer to execute the procedures or methods of the reference relationship management unit 12, the memory allocation unit 14, the program selection unit 17, and the execution program generation unit 16. It can also be said that the editing program causes a computer to execute the procedure or method of the editing device 30.
  • the memory 302 is also used as a temporary memory when the processor 301 executes various processes.
  • the compiler 11X executed by the processor 301 may be realized by a computer program product that is a recording medium in which the compiler 11X is stored.
  • An example of the recording medium in this case is a non-transitory computer-readable medium in which the compiler 11X is stored.
  • the editing program executed by the processor 301 may be realized by a computer program product which is a recording medium storing the editing program.
  • An example of the recording medium in this case is a non-transitory computer-readable medium in which an editing program is stored.
  • part of the functions of the programming device 10X may be realized by dedicated hardware, and part of it may be realized by software or firmware.
  • 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Stored Programmes (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

グローバル変数の宣言を含むシーケンスプログラム(P,Q)をコンパイルしてPLC(20)で実行される実行プログラム(31)を生成する処理を、コンピュータに実行させるコンパイラ(11X)であって、グローバル変数の宣言の編集前後で、グローバル変数に対して割付けられるPLC(20)内のメモリアドレスが変化した場合、編集前のグローバル変数に割付けられるメモリアドレスに格納される第1の値と、編集後のグローバル変数に割付けられるメモリアドレスに格納される第2の値とを同期させる実行コードを、編集後のグローバル変数を参照するシーケンスプログラム(P)に対応する実行プログラムに付与する。

Description

コンパイラおよびプログラミング支援装置
 本発明は、グローバル変数の宣言を含んだシーケンスプログラムをコンパイルするコンパイラおよびプログラミング支援装置に関する。
 制御装置であるPLC(Programmable Logic Controller:プログラマブルロジックコントローラ)は、シーケンスプログラムを用いてシーケンス制御を実行する。このシーケンスプログラムは、プログラミング装置で作成およびコンパイルが行われた後、PLCに書き込まれる。
 シーケンスプログラムには、全てのシーケンスプログラムから参照可能なグローバル変数が含まれる場合がある。このグローバル変数は、コンパイルによってPLCのメモリ領域に割付けられる。シーケンスプログラムがグローバル変数にアクセスする際には、グローバル変数の割付先のメモリアドレスが参照される。
 特許文献1に記載の情報処理装置は、複数のグローバル変数のうち一部のみが更新された状況を防ぐため、グローバル変数を公開領域と作業領域との2箇所に割付けておき、上位優先度のタスクは、作業領域を用いてグローバル変数を更新し、下位優先度のタスクは、公開領域を用いてグローバル変数を参照している。この情報処理装置は、下位優先度のタスクによるグローバル変数の参照が完了すると、作業領域と公開領域とを切換えることによって、グローバル変数の参照時の同時性(一貫性または無矛盾性とも呼ばれる)を確保している。
特開2002-149421号公報
 しかしながら、上記特許文献1の技術を含め従来一般的に、グローバル変数の宣言が編集されてグローバル変数に割付けられるメモリアドレスが変化した場合、再度、グローバル変数を参照している全てのシーケンスプログラムに対してコンパイルを実行していた。このため、コンパイルに要する時間が長くなるという問題があった。
 本発明は、上記に鑑みてなされたものであって、コンパイルに要する時間を抑制することができるコンパイラを得ることを目的とする。
 上述した課題を解決し、目的を達成するために、本発明は、グローバル変数の宣言を含むシーケンスプログラムをコンパイルして制御装置で実行される実行プログラムを生成する処理を、コンピュータに実行させるコンパイラであって、グローバル変数の宣言の編集前後で、グローバル変数に対して割付けられる制御装置内のメモリアドレスが変化した場合、編集前のグローバル変数に割付けられるメモリアドレスに格納される第1の値と、編集後のグローバル変数に割付けられるメモリアドレスに格納される第2の値とを同期させる実行コードを、編集後のグローバル変数を参照するシーケンスプログラムに対応する実行プログラムに付与する処理をコンピュータに実行させる、ことを特徴とする。
 本発明にかかるコンパイラは、コンパイルに要する時間を抑制することができるという効果を奏する。
本発明の実施の形態1にかかるプログラミング装置の構成を示すブロック図 実施の形態1にかかるプログラミング装置の動作手順の概略を示すフローチャート 実施の形態1にかかるグローバル変数の宣言を説明するための図 図3のグローバル変数を参照するシーケンスプログラムの例を示す図 実施の形態1にかかるメモリ割付情報の更新前の構成を示す図 グローバル変数が編集される前の、実施の形態1にかかる、実行プログラムと参照先のメモリアドレスとの関係を示す図 図3に示したグローバル変数が編集された後の、実施の形態1にかかるグローバル変数宣言の例を説明するための図 図4に示したシーケンスプログラムが編集された後のシーケンスプログラムの例を説明するための図 実施の形態1にかかるメモリ割付情報の更新後の構成を示す図 実施の形態1にかかるプログラミング装置によるグローバル変数の割付処理手順を示すフローチャート グローバル変数が編集された後の、実施の形態1にかかる、実行プログラムと参照先のメモリアドレスとの関係を示す図 実施の形態1にかかるプログラミング装置による実行プログラムの生成処理手順を示すフローチャート 実施の形態2にかかるプログラミング装置の構成を示すブロック図 図3に示したグローバル変数が編集された後の、実施の形態2にかかるグローバル変数宣言の例を説明するための図 グローバル変数が編集された後の、実施の形態2にかかる、実行プログラムと参照先のメモリアドレスとの関係を示す図 実施の形態3にかかるプログラミングシステムの構成を示すブロック図 実施の形態1から3にかかるプログラミング装置のハードウェア構成例を示す図
 以下に、本発明の実施の形態にかかるコンパイラおよびプログラミング支援装置を図面に基づいて詳細に説明する。なお、これらの実施の形態によりこの発明が限定されるものではない。
実施の形態1.
 図1は、本発明の実施の形態1にかかるプログラミング装置の構成を示すブロック図である。プログラミング支援装置であるプログラミング装置10Xは、シーケンスプログラム群35Xに含まれるシーケンスプログラムの作成を支援するコンピュータである。プログラミング装置10Xは、コンパイラ11Xを用いて、シーケンスプログラム群35Xに含まれるシーケンスプログラムをコンパイルする。
 プログラミング装置10Xは、制御装置であるPLC20に接続されている。プログラミング装置10Xは、シーケンスプログラム群35Xおよびグローバル変数群36Xを作成する機能と、シーケンスプログラム群35Xに含まれるシーケンスプログラムを編集する機能と、グローバル変数群36Xに含まれるグローバル変数の宣言を編集する機能とを有している。また、プログラミング装置10Xは、シーケンスプログラム群35Xおよびグローバル変数群36XをコンパイルすることによってPLC20で実行可能な実行プログラム31を生成する機能を有している。なお、本実施の形態におけるグローバル変数の編集は、グローバル変数の値を変更する処理ではなく、グローバル変数の宣言の編集である。グローバル変数を宣言する情報には、後述するデータ型または属性などが含まれている。
 プログラミング装置10Xは、コンパイラ11Xと、編集装置30と、通信部32と、プログラム格納部310とを備えている。編集装置30は、ユーザからの指示に従って、シーケンスプログラム群35Xおよびグローバル変数群36Xを作成し、ユーザからの指示に従って、シーケンスプログラム群35Xおよびグローバル変数群36Xを編集する。編集装置30は、作成または編集された、シーケンスプログラム群35Xおよびグローバル変数群36Xを記憶しておく。なお、編集装置30は、プログラミング装置10Xから独立した構成としてもよい。この場合、編集装置30は、プログラミング装置10Xに接続される。
 シーケンスプログラム群35Xには、シーケンスプログラムP,Qのように複数のシーケンスプログラムが含まれている。また、グローバル変数群36Xは、シーケンスプログラム群35Xで使用されるグローバル変数の集合である。グローバル変数群36Xには、後述するgVar1~gVar4のように複数のグローバル変数が含まれている。グローバル変数群36X内の各グローバル変数は、大域的なスコープを持つ変数であり、シーケンスプログラム群35X内の複数のシーケンスプログラムによって参照可能となっている。したがって、グローバル変数群36X内の各グローバル変数は、PLC20内に書き込まれた複数の実行プログラム31から参照可能である。
 シーケンスプログラム群35Xのプログラミング言語仕様は、例えば、国際電気標準会議によりIEC(International Electrotechnical Commission)61131-3として規格化されており、シーケンスプログラム群35Xは、データを保持する変数を使用することが可能である。シーケンスプログラム群35Xを記述するプログラミング言語としては、例えばIEC61131-3規格では、インストラクションリスト、ストラクチャードテキスト、ラダーダイアグラム、ファンクションブロックダイアグラム、シーケンシャルファンクションチャートが規定されているが、本実施の形態においてはこれらに限定されない。
 コンパイラ11Xは、PLC20で実行可能な実行プログラム31を生成するプログラムである。コンパイラ11Xは、シーケンスプログラム群35Xおよびグローバル変数群36Xをコンパイルすることによって、シーケンスプログラム群35Xおよびグローバル変数群36Xを実行プログラム31に変換する。コンパイラ11Xは、シーケンスプログラム群35Xに含まれる一部のシーケンスプログラムのみを、コンパイルすることもできる。
 コンパイラ11Xは、参照関係管理部12と、メモリ割付部14と、プログラム選択部17と、実行プログラム生成部16とを備えている。参照関係管理部12は、シーケンスプログラムとグローバル変数との参照関係を管理する。参照関係管理部12は、シーケンスプログラムとグローバル変数との参照関係を示す参照関係情報13を作成する。具体的には、参照関係管理部12は、シーケンスプログラム群35Xに含まれる全てのシーケンスプログラムと、グローバル変数群36Xに含まれる全てのグローバル変数との間の参照関係を参照関係情報13に登録する。
 参照関係管理部12は、シーケンスプログラム群35Xまたはグローバル変数群36Xが編集されて、シーケンスプログラム群35Xに含まれるシーケンスプログラムとグローバル変数群36Xに含まれるグローバル変数との参照関係が変更された場合には、参照関係情報13を更新する。
 参照関係情報13には、何れのシーケンスプログラムおよびグローバル変数が変更または追加されたことを示す変更有無情報が付加されている。また、参照関係情報13には、シーケンスプログラムおよびグローバル変数の変更内容を示す変更内容情報が付加されている。変更内容情報は、例えば、グローバル変数と、グローバル変数の変更後の属性とが対応付けされた情報である。属性に関しては後述する。参照関係管理部12は、コンパイルの完了したシーケンスプログラムおよびグローバル変数に対しては、参照関係情報13内から変更有無情報および変更内容情報を削除する。
 メモリ割付部14は、グローバル変数群36Xに含まれている全てのグローバル変数に対し、参照関係情報13に基づいて、PLC20のデータメモリ24または不揮発性データメモリ25への割付けを実行し、割付けの結果であるメモリ割付情報15を作成する。割付けの結果は、データメモリ24または不揮発性データメモリ25のメモリアドレスである。したがって、メモリ割付部14は、データメモリ24または不揮発性データメモリ25のメモリアドレスをメモリ割付情報15に登録する。このように、メモリ割付部14は、グローバル変数にメモリアドレスを設定してメモリ割付情報15に登録する。
 メモリ割付部14は、グローバル変数群36Xが編集されて、グローバル変数に割付けられるメモリアドレスが変化した場合には、参照関係情報13に基づいてメモリ割付情報15を更新する。メモリ割付部14は、例えば、グローバル変数の属性に許容されるメモリアドレスを設定する。
 プログラム選択部17は、参照関係情報13に付加されている変更有無情報に基づいて、シーケンスプログラム群35X内からコンパイル対象とするシーケンスプログラムを選択する。なお、コンパイル対象とするシーケンスプログラムは、編集装置30がユーザからの指示に従って選択してもよい。
 プログラム選択部17は、シーケンスプログラム群35Xが最初に作成された際には、シーケンスプログラム群35Xに含まれる全てのシーケンスプログラムをコンパイル対象として選択する。
 実行プログラム生成部16は、メモリ割付情報15と、プログラム選択部17によってシーケンスプログラム群35X内から選択されたシーケンスプログラムとを用いて、PLC20にて動作させる実行プログラム31を生成する。実行プログラム31は、PLC20が解釈および実行可能な命令列である実行コードによって構成される。なお、実行プログラム31の命令列は、PLC20のアーキテクチャに応じたものであれば、何れの形式の命令列であってもよい。
 実行プログラム生成部16は、作成した実行プログラム31をプログラム格納部310に格納する。プログラム格納部310は、実行プログラム31を記憶するメモリである。通信部32は、実行プログラム生成部16が生成した実行プログラム31を、PLC20に送信する。
 PLC20は、プログラミング装置10Xで生成された実行プログラム31を用いてシーケンス制御を実行する。PLC20は、プログラムメモリ21と、通信部22と、プログラム実行部23と、データメモリ24と、不揮発性データメモリ25とを備えている。データメモリ24および不揮発性データメモリ25は、グローバル変数を含む実行プログラム31が参照する変数を記憶するメモリである。データメモリ24は、揮発性のメモリであり、不揮発性データメモリ25は、不揮発性のメモリである。
 通信部22は、プログラミング装置10Xの通信部32から送信されてきた実行プログラム31を受信し、プログラムメモリ21に格納する。プログラムメモリ21は、実行プログラム31を記憶するメモリである。
 プログラム実行部23は、プログラムメモリ21から実行プログラム31を読み出し、実行プログラム31を構成する命令を実行する。データメモリ24は、シーケンスプログラム群35Xで使用されるグローバル変数のうち、停電保持属性のないものが割付けられるメモリである。不揮発性データメモリ25は、シーケンスプログラム群35Xで使用されるグローバル変数のうち、停電保持属性のあるものが割付けられる不揮発性のメモリである。停電保持属性は、停電が発生した際にも消えることなくデータを保持させることを指定するための属性である。したがって、停電保持属性が設定されているグローバル変数は、停電が発生した際にも消えることなくデータを保持するグローバル変数である。停電保持属性があるグローバル変数とは、例えばIEC61131-3規格におけるRETAIN属性を持つグローバル変数であるが、停電保持属性の表現はRETAIN属性に限定されるものではない。
 ここで、実行プログラム31に含まれる、データメモリ24および不揮発性データメモリ25を参照するためのメモリアクセス命令を、以下のように表現することとする。
 write(X,Ax):「X」の値を、メモリアドレスAxの領域に書き込む。
 read(Ay,Y):メモリアドレスAyの領域の値を読み出して「Y」の領域に書き込む。
 このように、「X」は、writeの命令(書き込み命令)によってメモリアドレスAxの領域に書き込まれる値を示し、「Y」は、readの命令(読み出し命令)によってメモリアドレスAyの領域から読み出された値が書き込まれる領域を示す。ここで、「X」および「Y」は、PLC20のアーキテクチャに応じたものであれば、何れの形式で示される値であってもよい。
 データメモリ24への参照は、メモリアドレスAxまたはメモリアドレスAyがデータメモリ24のメモリアドレス範囲である場合のwrite命令または、read命令の実行によって実現される。また、不揮発性データメモリ25への参照は、メモリアドレスAxまたはメモリアドレスAyが不揮発性データメモリ25のメモリアドレス範囲である場合のwrite命令またはread命令の実行によって実現される。ここで、メモリアドレスAxおよびメモリアドレスAyは、PLC20のアーキテクチャに応じたものであれば、何れの形式のメモリアドレスであってもよい。
 つぎに、プログラミング装置10Xの動作手順について説明する。図2は、実施の形態1にかかるプログラミング装置の動作手順の概略を示すフローチャートである。プログラミング装置10Xでは、ユーザからの指示に従って、編集装置30がシーケンスプログラム群35Xおよびグローバル変数群36Xを作成する(ステップS10)。コンパイラ11Xでは、参照関係管理部12がシーケンスプログラム群35X内のシーケンスプログラムとグローバル変数群36X内のグローバル変数との参照関係を示す参照関係情報13を作成する。また、メモリ割付部14が、グローバル変数群36Xのグローバル変数にメモリアドレスを割付ける。さらに、メモリ割付部14が、グローバル変数に割付けたメモリアドレスと、参照関係情報13とに基づいて、メモリ割付情報15を作成する(ステップS20)。
 実行プログラム生成部16は、シーケンスプログラム群35Xに含まれる全てのシーケンスプログラムに対して実行プログラム31を生成する(ステップS30)。具体的には、実行プログラム生成部16は、作成されたシーケンスプログラム群35Xおよびグローバル変数群36Xを用いて、実行プログラム31を生成する。そして、通信部32が、生成された実行プログラム31をPLC20に送信する(ステップS40)。これにより、PLC20は、実行プログラム31を実行することが可能となる。
 この後、プログラミング装置10Xでは、ユーザからの指示に従って、編集装置30がグローバル変数群36Xの一部およびシーケンスプログラム群35Xの一部を編集する。すなわち、編集装置30は、ユーザからの指示に従って、シーケンスプログラムおよびグローバル変数の宣言の編集を行う(ステップS50)。ここでは、グローバル変数群36Xのうちの一部のグローバル変数が編集されて、データメモリ24または不揮発性データメモリ25へのメモリアドレスの割付先が変更される場合について説明する。本実施の形態では、グローバル変数が、gVar1、gVar2、gVar3、gVar4を含んでおり、これらのうちのgVar1の属性などが編集によって変更され、gVar2、gVar3、gVar4は変更されないものとする。また、本実施の形態では、シーケンスプログラム群35XがシーケンスプログラムP,Qであり、gVar1の編集と同時にシーケンスプログラムPが編集されてgVar1の書き込み先および読出し元のメモリアドレスが変更され、シーケンスプログラムQは変更されないものとする。
 gVar1およびシーケンスプログラムPが編集された後、参照関係管理部12は、参照関係情報13を更新し、メモリ割付部14は、メモリ割付情報15を更新する(ステップS60)。具体的には、参照関係管理部12は、参照関係情報13内の変更有無情報および変更内容情報を更新する。また、メモリ割付部14は、参照関係情報13に基づいて、メモリ割付情報15内のシーケンスプログラムPのgVar1に対し、参照先のメモリアドレスを新たに割付ける。
 プログラム選択部17は、参照関係情報13に基づいて、シーケンスプログラム群35X内からコンパイル対象とするシーケンスプログラムPを選択する。プログラム選択部17が選択するシーケンスプログラムPは、割付先のメモリアドレスが変更されたグローバル変数を参照するシーケンスプログラムである。したがって、実行プログラム生成部16は、割付先のメモリアドレスが変更されたグローバル変数を参照するシーケンスプログラムに対して、実行プログラムを生成する(ステップS70)。以下では、シーケンスプログラムPを用いて生成された実行プログラムを実行プログラムEPという。このように、本実施の形態の実行プログラム生成部16は、複数のシーケンスプログラムP,Qを含んだシーケンスプログラム群35Xのうち、参照するグローバル変数の割付先のメモリアドレスが変更されたシーケンスプログラムPに対してのみコンパイルを行う。そして、通信部32が、生成された実行プログラムEPをPLC20に送信する(ステップS80)。これにより、PLC20は、実行プログラムEPに対応する古い実行プログラム31を、受信した実行プログラムEPで置き換える。
 つぎに、プログラミング装置10Xが実行する具体的な処理について説明する。図3は、実施の形態1にかかるグローバル変数の宣言を説明するための図である。図3では、IEC61131-3規格におけるグローバル変数の宣言方法に従ったグローバル変数の宣言例を示している。グローバル変数宣言361は、プログラミング装置10Xにおけるグローバル変数群36Xに相当する。ここでは、INT型のグローバル変数としてgVar1が宣言され、初期値が10.0のREAL型のグローバル変数としてgVar2が宣言され、停電保持属性を持つINT型のグローバル変数としてgVar3が宣言され、停電保持属性を持つWORD型のグローバル変数としてgVar4が宣言されている場合を示している。データ型である、INT型、REAL型、WORD型は、例えば、グローバル変数のデータサイズ等の意味を示す。本実施の形態では、編集前のグローバル変数と、編集後のグローバル変数とで、データ型が同じであり、グローバル変数に設定可能なデータサイズが編集前後で同じである場合について説明する。なお、本実施の形態におけるグローバル変数の宣言方法は、図3の形式に限定されるものではない。
 図4は、図3のグローバル変数を参照するシーケンスプログラムの例を示す図である。図4では、IEC61131-3規格におけるストラクチャードテキストで規定されたシーケンスプログラムの例を示している。図4に示すシーケンスプログラム群35Xは、シーケンスプログラム111P,111Qを含んでいる。シーケンスプログラム111Pは、変更前のシーケンスプログラムPの例であり、図4に示すシーケンスプログラム111Qは、変更前のシーケンスプログラムQの例である。
 シーケンスプログラム111Pでは、グローバル変数のgVar1に「P1」を書き込み、その後グローバル変数のgVar1の値を「P2」に読み出している。同様に、シーケンスプログラム111Qは、グローバル変数のgVar1に「Q1」を書き込み、その後グローバル変数のgVar1の値を「Q2」に読み出している。なお、図4では、gVar1以外のグローバル変数への参照は省略している。なお、グローバル変数への参照は図4の形式に限定されるものではない。
 グローバル変数宣言361内で宣言されているグローバル変数は、メモリ割付部14によってデータメモリ24または不揮発性データメモリ25のメモリアドレスに割付けられ、コンパイルによって実行プログラム31が生成されると、実行プログラム31の実行時に、割付先のメモリアドレスが参照される。ここでは、メモリ割付部14が、グローバル変数宣言361に基づいて、データメモリ24にgVar1およびgVar2を割付け、不揮発性データメモリ25にgVar3およびgVar4を割付ける。
 図5は、実施の形態1にかかるメモリ割付情報の更新前の構成を示す図である。図5では、メモリ割付部14が、グローバル変数宣言361に基づいて作成したメモリ割付情報151の構成例を示している。メモリ割付情報151は、メモリ割付情報15の一例である。メモリ割付情報151は、データメモリ24または不揮発性データメモリ25に割付けられたメモリアドレスを保持している。
 メモリ割付情報151は、グローバル変数群36X内のグローバル変数と、グローバル変数の割付先のメモリアドレスと、このメモリアドレスを参照するシーケンスプログラムと、の対応関係を示す情報である。
 メモリ割付情報151には、グローバル変数の変数名としてgVar1、gVar2、gVar3、gVar4が登録されている。また、メモリ割付情報151では、各グローバル変数に対して、データ型、種類、属性、初期値、メモリアドレス、参照プログラムが対応付けされている。
 データ型は、INT型、REAL型、WORD型などのグローバル変数のデータの型を示し、種類は、変数のスコープまたは使用方法を示し、属性は、変数の停電保持または定数といった性質を示す。ここでは、各グローバル変数に、グローバル変数を示すVAR_GLOBALが登録され、停電保持属性を有するグローバル変数に、RETAINが登録されている。初期値は、グローバル変数の初期値である。
 メモリアドレスは、グローバル変数に割付けられるメモリアドレスを示し、参照プログラムは、メモリアドレスを参照するシーケンスプログラムを示している。ここでは、メモリアドレスにメモリアドレスAa,Ab,Ac,Adを示す「Aa」、「Ab」、「Ac」、「Ad」が登録されている場合を示している。また、参照プログラムにおける「P」は、シーケンスプログラムPを示し、「Q」は、シーケンスプログラムQを示している。ここでの参照プログラムは、シーケンスプログラム111Pと、シーケンスプログラム111Qである。
 ここでは、gVar1は、データメモリ24のメモリアドレスAaに割付けられ、gVar2はデータメモリ24のメモリアドレスAbに割付けられ、gVar3は不揮発性データメモリ25のメモリアドレスAcに割付けられ、gVar4は不揮発性データメモリ25のメモリアドレスAdに割付けられたことを示している。なお、メモリ割付情報15の形式は、図5に示した形式に限定されるものではない。
 参照関係情報13では、gVar1、gVar2、gVar3、gVar4が、それぞれシーケンスプログラム111P,111Qから参照されることが示されているものとする。この場合、参照関係情報13を用いて作成されるメモリ割付情報151でも、gVar1、gVar2、gVar3、gVar4が、シーケンスプログラム111Pおよびシーケンスプログラム111Qに参照されていることを示す。
 ここで、シーケンスプログラム111P,111Qから生成された実行プログラムと、これらの実行プログラムによって参照されるメモリアドレスとの関係について説明する。図6は、グローバル変数が編集される前の、実施の形態1にかかる、実行プログラムと参照先のメモリアドレスとの関係を示す図である。図6では、編集前のグローバル変数が、データメモリ24または不揮発性データメモリ25に割付けられているイメージを示している。
 ここでは、シーケンスプログラム111Pがコンパイルされて生成された実行プログラムEP51と、シーケンスプログラム111Qがコンパイルされて生成された実行プログラムEQ51と、データメモリ24と、不揮発性データメモリ25との関係を示している。
 実行プログラムEP51のwriteは、gVar1が割付けられたメモリアドレスAaへの「P1」の書き込みを実行させる命令であり、readは、gVar1が割付けられたメモリアドレスAaの値を読み出して「P2」への書き込みを実行させる命令である。これらは、それぞれ実行プログラムEP51のソースプログラムであるシーケンスプログラム111Pにおける、gVar1への「P1」の書き込みと、gVar1から読み出した値の「P2」への書き込みとを意味している。
 同様に、実行プログラムEQ51のwriteは、gVar1が割付けられたメモリアドレスAaへ「Q1」の書き込みを実行させる命令であり、readは、gVar1が割付けられたメモリアドレスAaの値を読み出して「Q2」への書き込みを実行させる命令である。これらは、それぞれ実行プログラムEQ51のソースプログラムであるシーケンスプログラム111Qにおける、gVar1への「Q1」への書き込みと、gVar1から読み出した値の「Q2」への書き込みとを意味している。なお、図6では、gVar1以外のグローバル変数の参照は省略している。
 図7は、図3に示したグローバル変数が編集された後の、実施の形態1にかかるグローバル変数宣言の例を説明するための図である。ここでは、図3に示したグローバル変数宣言361に対して、gVar1が停電保持属性を持つよう変更された場合のグローバル変数宣言362を示している。グローバル変数宣言362では、図3にて宣言されていたgVar1が、コメントとして扱われることによって削除され、停電保持属性を持つグローバル変数としてgVar1が宣言されている。
 図8は、図4に示したシーケンスプログラムが編集された後のシーケンスプログラムの例を説明するための図である。図8に示すシーケンスプログラム群35Xは、シーケンスプログラム112P,111Qを含んでいる。図8に示すシーケンスプログラム112Pは、変更後のシーケンスプログラムPの例である。
 前述のgVar1の編集とともに、図4に示したシーケンスプログラム111Pが、図8に示すシーケンスプログラム112Pに変更されたものとする。すなわち、gVar1に書き込まれる値が「P1」から「P3」に変更され、gVar1の値を読み出して書き込む領域が「P2」から「P4」に変更されたものとする。なお、図8に示すシーケンスプログラム111Qは変更されていない。
 図9は、実施の形態1にかかるメモリ割付情報の更新後の構成を示す図である。図9では、メモリ割付部14が、グローバル変数宣言362に基づいて作成したメモリ割付情報152の構成例を示している。メモリ割付情報152は、メモリ割付情報15の一例である。メモリ割付情報152は、グローバル変数宣言361がグローバル変数宣言362に変更されるとともにシーケンスプログラム111Pがシーケンスプログラム112Pに変更された場合に、メモリ割付部14がメモリ割付情報151を更新することによって作成される。したがって、ここでの参照プログラムは、シーケンスプログラム112Pと、シーケンスプログラム111Qである。メモリ割付情報152は、メモリ割付情報151と同様に、データメモリ24または不揮発性データメモリ25に割付けられたメモリアドレスを保持している。
 グローバル変数宣言362およびシーケンスプログラム112Pでは、gVar1の箇所が編集されているので、メモリ割付情報152では、メモリ割付情報151と比較して、gVar1に対応する項目が更新されている。ここでは、メモリ割付部14が、gVar1に対して新たにメモリアドレスAeを割り付ける場合について説明する。
 gVar1に対応する項目のうち、割付先のメモリアドレスの項目は、gVar1を編集する前のメモリアドレスとgVar1を編集した後のメモリアドレスとが登録されている。具体的には、gVar1に対応するメモリアドレスの箇所には、gVar1を編集する前のメモリアドレスであるメモリアドレスAaと、gVar1を編集した後のメモリアドレスであるメモリアドレスAeとが登録されている。そして、gVar1の参照プログラムの箇所には、gVar1を編集する前のメモリアドレスAaに対応付けされた第1のプログラムであるシーケンスプログラムQと、gVar1を編集した後のメモリアドレスAeに対応付けされた第2のプログラムであるシーケンスプログラムPとが登録されている。
 また、メモリ割付情報152では、gVar1においてシーケンスプログラムQに参照されるメモリアドレスAaは、メモリアドレスAeに変更されたことを示す情報が登録される。この情報は、メモリアドレスAaの値とメモリアドレスAeの値とが同期される必要があることを示している。
 つぎに、プログラミング装置10Xによる、グローバル変数の割付処理手順について説明する。図10は、実施の形態1にかかるプログラミング装置によるグローバル変数の割付処理手順を示すフローチャートである。
 ここでは、メモリ割付部14の動作手順について説明する。メモリ割付部14は、編集後のグローバル変数群36Xにおいてグローバル変数が存在するか否かを判定する(ステップS100)。換言すると、メモリ割付部14は、グローバル変数が宣言されているか否かを判定する。
 グローバル変数が存在する場合(ステップS100、Yes)、メモリ割付部14は、メモリアドレスの割付対象となるグローバル変数を取得する(ステップS110)。この処理は、グローバル変数群36Xから、割付対象となるグローバル変数、すなわちコンパイル前に編集されたグローバル変数を取得する処理である。具体的には、メモリ割付部14は、グローバル変数群36Xの中から、編集によってメモリアドレスの新たな割付けが必要となったグローバル変数を取得する。
 続いて、メモリ割付部14は、取得したグローバル変数に割付先のメモリアドレスが設定されているか否かを判定する(ステップS120)。メモリアドレスが設定されている場合(ステップS120、Yes)、このメモリアドレスが設定されているグローバル変数は、既存のものである。メモリアドレスの割付対象となるグローバル変数は、既存のグローバル変数に編集が行われたグローバル変数である。このため、メモリ割付部14は、既存の割付先のメモリアドレスを維持したまま新規にメモリアドレスを割付けるため、新規のメモリアドレスを登録するための登録先である登録領域をメモリ割付情報152に作成する(ステップS130)。なお、メモリ割付情報15における登録領域は、メモリ割付情報15に応じたものであれば何れの領域であってもよい。
 メモリ割付部14は、新規に作成した登録領域に対して、参照プログラムを登録する(ステップS140)。ここでのメモリ割付部14は、参照関係情報13を参照することで参照プログラムを特定し、特定した参照プログラムをメモリ割付情報152に登録する。
 さらに、メモリ割付部14は、コンパイル対象であるグローバル変数の割付先のメモリアドレスを決定し、作成済みの登録領域に対して登録する(ステップS150)。
 一方、ステップS120において、メモリアドレスが設定されていない場合(ステップS120、No)、メモリ割付部14が取得したグローバル変数は、初めてメモリアドレスの割付対象となるグローバル変数である。この場合、メモリ割付部14は、割付先のメモリアドレスを決定し、メモリ割付情報152に登録する(ステップS150)。なお、割付先のメモリアドレスの決定方法は、PLC20のアーキテクチャに応じた方法であれば、何れの方法が適用されてもよい。
 この後、メモリ割付部14は、グローバル変数群36Xにおいてグローバル変数が残っているか否か、すなわち、割付処理が必要なグローバル変数が存在するか否かを判定する(ステップS100)。
 グローバル変数が存在する場合(ステップS100、Yes)、上述したステップS110からS150およびステップS100の処理を繰り返す。一方、グローバル変数が存在しない場合(ステップS100、No)、メモリ割付部14は、割付処理を終了する。すなわち、メモリアドレスの割付が全てのグローバル変数に対して完了した場合、メモリ割付部14は、割付処理を終了する。上述したグローバル変数の割付処理によって、全てのグローバル変数に対して、割付先のメモリアドレスを設定することができる。また、編集が行われたグローバル変数に対しては、割付先となる複数のメモリアドレスを設定することが可能となる。
 この図10で説明した処理により、本実施の形態では、メモリ割付情報152のgVar1に対して、メモリアドレスAeと参照プログラムであるシーケンスプログラムPとが登録される。この後、実行プログラム生成部16は、シーケンスプログラム111Pから編集されたシーケンスプログラム112Pに対してメモリ割付情報152を用いて実行プログラムEPを作成する。
 ここで、シーケンスプログラム群35Xおよびグローバル変数群36Xが編集された後に生成された実行プログラムと、これらの実行プログラムによって参照されるメモリアドレスとの関係について説明する。図11は、グローバル変数が編集された後の、実施の形態1にかかる、実行プログラムと参照先のメモリアドレスとの関係を示す図である。図11では、編集後のグローバル変数がデータメモリ24または不揮発性データメモリ25に割付けられているイメージを示している。ここでは、シーケンスプログラム112Pがコンパイルされて生成された実行プログラムEP52と、作成済みの実行プログラムEQ51と、データメモリ24と、不揮発性データメモリ25との関係を示している。なお、図11では、gVar1以外のグローバル変数の参照は省略している。
 本実施の形態では、シーケンスプログラム111Pが編集されてシーケンスプログラム112Pが作成されているが、シーケンスプログラム111Qは編集されていない。したがって、コンパイルされるのは、シーケンスプログラム112Pであり、シーケンスプログラム111Qはコンパイルする必要がない。
 図11において、実行プログラムEP52のwriteは、gVar1が割付けられたメモリアドレスAeへの「P3」の書き込みを実行させる命令であり、readは、gVar1が割付けられたメモリアドレスAeの値を読み出して「P4」への書き込みを実行させる命令である。これらは、それぞれ実行プログラムEP52のソースプログラムであるシーケンスプログラム112Pにおける、gVar1への「P3」の書き込みと、gVar1から読み出した値の「P4」への書き込みとを意味している。実行プログラムEQ51は、編集されていないので、図6で説明したものと同様のものである。
 図11に示すように、編集によって更新された実行プログラムEP52が参照するgVar1は、不揮発性データメモリ25内のメモリアドレスAeに割付けられ、編集されていない実行プログラムEQ51が参照するgVar1は、データメモリ24内のメモリアドレスAaへの割付けが維持される。このように、編集前のグローバル変数の割付先を維持したまま、編集後のグローバル変数の割付けが実行される。
 コンパイル対象となるシーケンスプログラム112PのgVar1の参照は、gVar1に新規に割付けられる不揮発性データメモリ25内のメモリアドレスAeへの参照として実現される。すなわち、実行プログラムEP52では、gVar1への書き込みはメモリアドレスAeへのwriteとして、gVar1からの読み出しはメモリアドレスAeへのreadとして実行コードが付与される。
 また、本実施の形態の実行プログラム生成部16は、新規に割付けられたグローバル変数を参照する命令に対して、変更前のメモリアドレスAaに格納される値と、変更後のメモリアドレスAeに格納される値とを同期させるための命令を挿入する。具体的には、実行プログラム生成部16は、writeの直後およびreadの直前に、copy(Bc,Bd)の命令(コピー命令)を挿入する。
 copy(Bc,Bd):メモリアドレスBcの値を、メモリアドレスBdの領域に書き込む。
 図11では、BcおよびBdの一方が、Aeであり他方がAaである場合を示している。なお、ここで挿入されるcopyは、直前のwrite、または直後のreadと不可分に動作する命令とする。図11の実行プログラムEP52において、copy(Ae,Aa)の命令は、write(P3,Ae)の直後に挿入される。このcopy(Ae,Aa)が実行されると、不揮発性データメモリ25のメモリアドレスAeに割付けられたgVar1の値がコピーされて、データメモリ24のメモリアドレスAaに割付けられたgVar1に書きまれる(s1)。
 同様に、図11の実行プログラムEP52において、copy(Aa,Ae)の命令は、read(Ae,P4)の直前に挿入される。このcopy(Aa,Ae)が実行されると、データメモリ24のメモリアドレスAaに割付けられたgVar1の値がコピーされて、不揮発性データメモリ25のメモリアドレスAeに割付けられたgVar1に書きまれる(s2)。
 これにより、シーケンスプログラム112Pで参照されるgVar1の値と、シーケンスプログラム111Qで参照されるgVar1の値とが同じ値となる。この結果、gVar1への編集があった場合でも、編集後の実行プログラムEP52と編集前の実行プログラムEQ51とで同じ値のgVar1を参照することが可能となる。
 ここで、実行プログラムEP52の生成処理手順について説明する。図12は、実施の形態1にかかるプログラミング装置による実行プログラムの生成処理手順を示すフローチャートである。
 ここでは、実行プログラム生成部16がシーケンスプログラム112Pから実行プログラムEP52を生成する処理について説明する。実行プログラム生成部16は、コンパイル対象のシーケンスプログラム112Pに対し、特定単位毎にステップS200からS280の処理を実行する。ここで、シーケンスプログラム112Pの特定単位は、シーケンスプログラム112Pを記述するプログラミング言語に応じたものであれば、何れの単位であってもよい。特定単位の例は、シーケンスプログラム112Pの1行である。
 実行プログラム生成部16は、シーケンスプログラム112Pの特定単位に対して、PLC20で実行可能な実行コードを生成する(ステップS200)。この実行コードを生成する際にグローバル変数が現れた場合、実行プログラム生成部16は、割付先であるメモリアドレスを任意の値にしておく。
 続いて、実行プログラム生成部16は、コンパイル対象の特定単位がグローバル変数を含むか否かを判定する(ステップS210)。具体的には、実行プログラム生成部16は、ステップS200で用いられた特定単位がグローバル変数を含むか否かを判定する。
 コンパイル対象がグローバル変数を含む場合(ステップS210、Yes)、実行プログラム生成部16は、コンパイル対象の参照プログラムに合致するメモリアドレスを取得して実行コードを決定する(ステップS220)。ここでの、実行プログラム生成部16は、メモリ割付情報152に基づいて、コンパイル対象となるgVar1の割付先のメモリアドレスAa,Aeのうち、コンパイル対象となるシーケンスプログラムPに対応付けされているメモリアドレスAeを取得する。換言すると、実行プログラム生成部16は、コンパイル対象となるグローバル変数に割付けられたメモリアドレスの中から、コンパイル対象となる参照プログラムが対応付けされているものを取得する。そして、実行プログラム生成部16は、ステップS200で任意の値としていたグローバル変数の割付先のメモリアドレスを、取得したメモリアドレスに置き換えるとともに、置き換えたメモリアドレスに対応する実行コードを決定する。これにより、グローバル変数が複数のメモリアドレスに割付けられていた場合であっても、コンパイル対象のシーケンスプログラムが参照するメモリアドレスを設定できる。
 続いて、実行プログラム生成部16は、コンパイル対象のグローバル変数に、複数のメモリアドレスが割付けられているか否かを判定する(ステップS230)。メモリアドレスAa,Aeのように複数のメモリアドレスが割付けられている場合(ステップS230、Yes)、メモリアドレスAa,Ae間で同じ値を格納するために、実行プログラム生成部16は、実行プログラムEP52内にcopyの命令を作成する。
 実行プログラム生成部16は、実行プログラムEP52内に生成済みの命令がwriteであるか否かを判定する(ステップS240)。実行プログラムEP52内に生成済みの命令がwriteの場合(ステップS240、Yes)、実行プログラム生成部16は、writeの直後にcopyを挿入する(ステップS250)。ここで、実行プログラム生成部16は、copyによる値の取得元のメモリアドレスをステップS220で取得したメモリアドレスAeとし、copyによる値の書き込み先のメモリアドレスをメモリ割付情報152に基づいて設定する。このとき、実行プログラム生成部16は、ステップS230で複数のメモリアドレスが割付けられていると判定されたメモリアドレスAa,Aeのうち、ステップS220で取得されたメモリアドレスAe以外のメモリアドレスAaを、copyによる値の書き込み先に設定する。このようにメモリアドレスが複数存在する場合、実行プログラム生成部16は、メモリアドレスの数だけ実行プログラムEP52内にcopyを挿入する。
 実行プログラムEP52内に生成済みの命令がwriteでない場合(ステップS240、No)、実行プログラム生成部16は、実行プログラムEP52内に生成済みの命令がreadであるか否かを判定する(ステップS260)。実行プログラムEP52内に生成済みの命令がreadの場合(ステップS260、Yes)、実行プログラム生成部16は、readの直前にcopyを挿入する(ステップS270)。
 ここで、実行プログラム生成部16は、ステップS250と同様の方法によって、copyによる値の取得元のメモリアドレスAaと、copyによる値の書き込み先のメモリアドレスAeとを設定する。実行プログラム生成部16は、ステップS250またはステップS270の処理の後にステップS280の処理を行う。
 また、ステップS260において、実行プログラムEP52内に生成済みの命令がreadでない場合(ステップS260、No)、copyの命令は必要がない。この場合、実行プログラム生成部16は、copyの命令を挿入することなく、ステップS280の処理を行う。
 また、ステップS230において、複数のメモリアドレスが割付けられていない場合(ステップS230、No)、コンパイル対象のグローバル変数は唯一のメモリアドレスに割り付けられているので、copyの命令は必要がない。この場合、実行プログラム生成部16は、copyの命令を挿入することなく、ステップS280の処理を行う。
 また、ステップS210において、コンパイル対象がグローバル変数を含まない場合(ステップS210、No)、実行プログラム生成部16は、copyの命令を挿入することなく、ステップS280の処理を行う。
 ステップS250の後、ステップS270の後、ステップS260でNoの場合、ステップS230でNoの場合、またはステップS210でNoの場合、実行プログラム生成部16は、コンパイル対象が残っているか否かを判定する(ステップS280)。実行プログラム生成部16は、シーケンスプログラム112Pの特定単位毎にステップS200からS280の処理を繰り返すので、コンパイル対象となる特定単位がシーケンスプログラム112P内に残っているか否かを判定する。すなわち、実行プログラム生成部16は、コンパイル対象のうち、ステップS200からS280の処理を行っていない特定単位が存在するか否かを判定する。
 コンパイル対象が残っている場合(ステップS280、Yes)、実行プログラム生成部16は、残っているコンパイル対象の中の特定単位に対してステップS200からS280の処理を繰り返す。コンパイル対象が残っていない場合(ステップS280、No)、実行プログラム生成部16は、実行プログラムEP52の生成処理を終了する。
 このように、実行プログラム生成部16は、複数のメモリアドレスにて保持される値をcopyによってメモリアドレス間で同期させるので、複数のシーケンスプログラム112P,111Qが参照するグローバル変数の値を唯一の値とすることができる。
 複数のメモリアドレスにて保持される値をcopyによってメモリアドレス間で同期させない場合、グローバル変数が更新されると、グローバル変数が割付けられるメモリアドレスが変更されるので、グローバル変数を参照しているシーケンスプログラムの全てをコンパイルする必要がある。
 特に、シーケンスプログラムの個数が多い大規模システムでは、特定のグローバル変数が編集された場合、コンパイルの対象およびPLCへの書き込み対象は、グローバル変数を参照している全てのシーケンスプログラムとなる。このため、大規模システムでは、コンパイルおよびPLCへの書き込みに要する時間が長くなる。
 また、シーケンスプログラムを用いるシステムにおいては、PLCによって制御される装置を立ち上げる際の動作調整またはデバッグのため、コンパイルおよびPLCへの書き込みが頻繁に繰り返される。このため、デバッグまたは調整の際にもコンパイルおよびPLCへの書き込み時間が長くなる。
 これに対し、本実施の形態のプログラミング装置10Xは、コンパイル対象を、割付先のメモリアドレスが変更されたシーケンスプログラム112Pに限定することができる。なお、本実施の形態では、copyをwriteの直後に挿入することによって複数の命令でグローバル変数の同期を行う場合について説明したが、copyおよびwriteの代わりに、copyおよびwriteを実行させるための単一の命令を挿入してもよい。同様に、本実施の形態では、copyをreadの直前に挿入することによって複数の命令でグローバル変数の同期を行う場合について説明したが、readおよびcopyの代わりに、readおよびcopyを実行させるための単一の命令を挿入してもよい。このように、プログラミング装置10Xは、実行コードを単一の命令で構成してもよいし、複数の命令で構成してもよい。
 このように、実施の形態1では、グローバル変数の宣言の編集前後で、グローバル変数に割付けられるメモリアドレスが変化した場合、編集前からの割付先であるメモリアドレスAaで保持する値と、編集後の割付先であるメモリアドレスAeで保持する値とを、copyの命令にて同期させている。これにより、グローバル変数が編集される前のメモリアドレスAaへ割付けられている未編集のシーケンスプログラム111Qをコンパイル対象から除外できる。したがって、シーケンスプログラムのコンパイルの処理時間を抑制することができる。
 また、PLC20は、未編集のシーケンスプログラム111Qに対応する実行プログラムEQ51をそのまま用いてシーケンス制御を実行することができる。したがって、実行プログラムEP52をPLC20に書き込む際に、実行プログラムEQ51のPLC20への書き込みを省略することができる。
実施の形態2.
 つぎに、図13から図15を用いてこの発明の実施の形態2について説明する。実施の形態2では、ユーザによって設定されたコンパイル方法で、シーケンスプログラムをコンパイルする。また、特定のコンパイル方法が選択された場合には、編集の前後でグローバル変数に設定可能なデータサイズが異なる場合であっても、データ型変換を実行する命令を用いて、実施の形態1のようにグローバル変数を複数のメモリアドレスに割付ける。
 図13は、実施の形態2にかかるプログラミング装置の構成を示すブロック図である。図13の各構成要素のうち図1に示す実施の形態1のプログラミング装置10Xと同一機能を達成する構成要素については同一符号を付しており、重複する説明は省略する。
 プログラミング支援装置であるプログラミング装置10Yは、プログラミング装置10Xと比較して、コンパイルオプション41に基づいて、コンパイル方法を選択するコンパイルオプション判定部18を備える点が異なる。具体的には、プログラミング装置10Yは、コンパイラ11Yと、編集装置30と、通信部32と、プログラム格納部310とを備えている。コンパイラ11Yは、コンパイラ11Xの構成要素に加えて、コンパイルオプション判定部18を備えている。
 コンパイルオプション41は、コンパイルの方法を選択するための情報である。コンパイルオプション41では、第1のオプションと第2のオプションとの何れかが設定されている。第1のオプションは、各グローバル変数に唯一のメモリアドレスを割付けるコンパイル方法を示す値で示され、第2のオプションは、各グローバル変数に複数のメモリアドレスを割付けるコンパイル方法を示す値で示される。したがって、コンパイルオプション41には、予めユーザが第1のオプションを示す値または第2のオプションを示す値を格納しておく。
 第1のオプションによるコンパイルでは、各グローバル変数に唯一のメモリアドレスが割付けられるので、割付先のメモリアドレスが変更された全てのシーケンスプログラムがコンパイル対象となる。
 第2のオプションによるコンパイルでは、実施の形態1と同様に、グローバル変数を複数のメモリアドレスに割付可能とし、コンパイル対象となるシーケンスプログラムを限定する。なお、複数のメモリアドレスに割付けられているグローバル変数の値は、これを参照するシーケンスプログラム間で一致しない場合があるものとする。
 コンパイルオプション判定部18は、コンパイルオプション41に基づいて、第1のオプションで指定された方法でコンパイルを実行するか、第2のオプションで指定された方法でコンパイルを実行するかを判定する。コンパイルオプション判定部18は、判定結果として、第1のオプションを指定した第1の指示情報または第2のオプションを指定した第2の指示情報を、メモリ割付部14、プログラム選択部17、および実行プログラム生成部16に送信する。
 メモリ割付部14、プログラム選択部17、および実行プログラム生成部16は、コンパイルオプション判定部18からの第1の指示情報または第2の指示情報に従って処理を実行する。具体的には、メモリ割付部14は、コンパイルオプション判定部18から第1の指示情報を受信すると、各グローバル変数に唯一のメモリアドレスを割付ける。また、メモリ割付部14は、コンパイルオプション判定部18から第2の指示情報を受信すると、実施の形態1と同様の方法によってグローバル変数にメモリアドレスを割付ける。
 また、プログラム選択部17は、コンパイルオプション判定部18から第1の指示情報を受信すると、割付先のメモリアドレスが変更されたグローバル変数を参照する全てのシーケンスプログラムを選択する。また、プログラム選択部17は、コンパイルオプション判定部18から第2の指示情報を受信すると、実施の形態1と同様の方法によってシーケンスプログラムを選択する。
 また、実行プログラム生成部16は、コンパイルオプション判定部18から第1の指示情報を受信すると、割付先のメモリアドレスが変更されたグローバル変数を参照する全てのシーケンスプログラムにコンパイルを実行する。
 また、実行プログラム生成部16は、コンパイルオプション判定部18から第2の指示情報を受信すると、実施の形態1と同様の方法によってシーケンスプログラムをコンパイルする。
 実行プログラム生成部16は、第1のオプションの場合、実施の形態1におけるcopyを挿入しない実行プログラムを生成し、第2のオプションの場合、実施の形態1で生成したcopyの命令の代わりに、データ型変換を実行させる命令を生成する。
 図14は、図3に示したグローバル変数が編集された後の、実施の形態2にかかるグローバル変数宣言の例を説明するための図である。ここでは、図3に示したグローバル変数宣言361に対し、gVar1のデータ型が変更された場合のグローバル変数宣言363を示している。グローバル変数宣言363では、図3にて宣言されていたgVar1が、コメントとして扱われることによって命令としては削除され、データ型がREAL型であるグローバル変数としてgVar1が宣言されたものとする。IEC61131-3規格では、INT型は16ビット符号付き整数であり、REAL型は32ビット単精度浮動小数点数である。なお、ここで示したデータ型は、一例であり、他のデータ型が適用されてもよい。
 各データ型が要求するデータサイズは、IEC61131-3規格のINT型およびREAL型のように、データ型によって異なるので、グローバル変数に割付けるメモリ量はデータ型ごとに異なる。このため、本実施の形態において、グローバル変数がデータ型の編集によって複数の割付先を持つこととなる場合、それぞれの割付先のデータサイズが異なる場合がある。
 この場合、実施の形態1で説明したコピーに相当する処理は、適合するデータ型の値を同期することができる処理でなければならない。しかしながら、異なるデータサイズであるデータ型における値のコピーでは、コピー元の値とコピー先の値とは必ずしも一致しない場合がある。例えば、データサイズの大きいデータ型の値をデータサイズの小さいデータ型にコピーする場合、データサイズの小さいデータ型で取りうる範囲の値を越えたものは、データサイズの小さいデータ型に正しくコピーできない。このため、本実施の形態では、第1のオプションを示す値と、第2のオプションを示す値との何れかをコンパイルオプション41に格納しておくことで、ユーザが所望するコンパイル方法でコンパイルを実行する。
 ここで、第2のオプションについて詳細に説明する。前述したように、データサイズが異なるデータ型同士では、値のコピーを実行しても必ずしもその値は一致しない場合がある。しかしながら、特定の種類のデータ型、例えば数値を表すデータ型においては、異なるデータ型であっても特定の範囲においては同じ値を表現することができる。本実施の形態では、この点に着目し、グローバル変数がシーケンスプログラム毎に同じ値となることを保証しないことで、実施の形態1と同様に、未編集のシーケンスプログラムをコンパイル対象としないこととする。
 図14に示したようにgVar1のデータ型がINT型からREAL型に編集された場合、実行プログラム生成部16は、図11で示した実行プログラムEP52において、writeの直後のcopyの代わりに、REAL型をINT型に変換する以下のREAL2INT(Cc,Cd)の命令を挿入する。
 REAL2INT(Cc,Cd):メモリアドレスCcのREAL型の値を、メモリアドレスCdの領域にINT型として書き込む。
 同様に、実行プログラム生成部16は、図11で示した実行プログラムEP52において、readの直前のcopyの代わりに、INT型をREAL型に変換する以下のINT2REAL(Cc,Cd)の命令を挿入する。
 INT2REAL(Cc,Cd):メモリアドレスCcのINT型の値を、メモリアドレスCdの領域にREAL型として書き込む。
 このように、実行プログラム生成部16は、データ型を変換したうえで値を書き込む命令を用いて、編集前からの割付先であるメモリアドレスで保持する値と、編集後の割付先であるメモリアドレスで保持する値とを同期させる。
 上述のREAL2INTおよびINT2REALは、PLC20のアーキテクチャに従って、単一の命令または複数の命令から構成された命令群の何れかで実現される。ただし、これらの命令は、REAL2INTの直前のwrite、またはINT2REALの直後のreadと不可分に実行されるものとする。
 図15は、グローバル変数が編集された後の、実施の形態2にかかる、実行プログラムと参照先のメモリアドレスとの関係を示す図である。図15では、グローバル変数が、第2のオプションによって、データメモリ24または不揮発性データメモリ25に割付けられているイメージを示している。
 本実施の形態も実施の形態1と同様に、シーケンスプログラム111Pが編集されてシーケンスプログラム112Pが作成され、シーケンスプログラム111Qは編集されていないものとする。第2のオプションが用いられる場合、コンパイルされるのは、シーケンスプログラム112Pであり、シーケンスプログラム111Qはコンパイルする必要がない。
 図15に示すように、編集によって更新された実行プログラムEP53のgVar1は、データメモリ24内のメモリアドレスAeに割付けられ、編集されていない実行プログラムEQ51のgVar1は、データメモリ24内のメモリアドレスAaへの割付けが維持される。このように、本実施の形態でも実施の形態1と同様に、編集前のグローバル変数の割付先を維持したまま、編集後のグローバル変数の割付けが実行される。
 実施の形態1における図11のwriteの直後のcopyは、本実施の形態では、REAL2INTになり、実施の形態1における図11のreadの直前のcopyは、本実施の形態では、INT2REALとなる。
 REAL2INTにより、実行プログラムEP53が参照するメモリアドレスAeにwriteにてREAL型として書き込まれる値は、実行プログラムEQ51が参照するメモリアドレスAaにINT型として同期される(s3)。すなわち、REAL2INTにより、メモリアドレスAeの値がコピーされたうえでデータ型が変換されてメモリアドレスAaに書き込まれる。
 また、INT2REALにより、実行プログラムEQ51が参照するメモリアドレスAaにreadにてINT型として読み出される値は、実行プログラムEP53が参照するメモリアドレスAeにREAL型として同期される(s4)。すなわち、INT2REALにより、メモリアドレスAaの値がコピーされたうえでデータ型が変換されてメモリアドレスAeに書き込まれる。
 なお、本実施の形態で例示した、データ型変換を実行する命令である、REAL2INTおよびINT2REALは、シーケンスプログラムで使用可能なデータ型およびPLC20のアーキテクチャに応じたものであれば、何れの命令であってもよい。
 このように、実施の形態2では、ユーザがコンパイルオプション41によって第1のオプションと第2のオプションとを選択することができる。また、第2のオプションでコンパイルが実行される場合、編集前からの割付先であるメモリアドレスAaで保持する値と、編集後の割付先であるメモリアドレスAeで保持する値とを、データ型変換を実行する命令にて同期させている。これにより、編集の前後でデータ型のデータサイズが異なる場合であっても、編集されていないシーケンスプログラム111Qをコンパイル対象から除外できる。したがって、シーケンスプログラムのコンパイルの処理時間を抑制することができる。
実施の形態3.
 つぎに、図16を用いてこの発明の実施の形態3について説明する。実施の形態3では、複数のプログラミング装置がPLC20に接続されている場合に、特定のプログラミング装置が特定のシーケンスプログラムにコンパイルを実行する。
 図16は、実施の形態3にかかるプログラミングシステムの構成を示すブロック図である。図16の各構成要素のうち図1に示す実施の形態1のプログラミング装置10Xと同一機能を達成する構成要素については同一符号を付しており、重複する説明は省略する。
 プログラミング支援システムであるプログラミングシステム1は、プログラミング装置10A,10Bと、PLC20とを備えている。プログラミング装置10A,10Bは、プログラミング装置10Xと同様の機能を有している。なお、プログラミング装置10A,10Bの少なくとも一方は、プログラミング装置10Yと同様の機能を有した装置であってもよい。プログラミング装置10A,10Bは、PLC20に接続されており、これによりプログラミング装置10A,10BはPLC20を介した情報の送受信を行うことができる。なお、プログラミング装置10A,10Bは、直接接続されてもよいし、PLC20以外の装置を介して接続されてもよい。
 プログラミングシステム1では、プログラミング装置10Aが作成したグローバル変数群36Xと、メモリ割付情報15とを、以下の(1-a)または(1-b)の方法でプログラミング装置10Bにコピーする。プログラミング装置10Aからプログラミング装置10Bにコピーされるグローバル変数群36Xの例は、グローバル変数宣言361である。また、プログラミング装置10Aからプログラミング装置10Bにコピーされるメモリ割付情報15には、割付先のメモリアドレスと、参照プログラムを示す情報とが含まれている。また、プログラミング装置10Aは、メモリ割付情報15内に、図5で説明した項目に加えて、メモリ割付情報15がプログラミング装置10Aで作成されたことを示す情報をグローバル変数に対応付けして格納しておく。
 (1-a)
 プログラミング装置10Aが、グローバル変数群36Xおよびメモリ割付情報15を格納したファイルを、プログラミング装置10Bに送信する。プログラミング装置10Bでは、取得部である通信部32がプログラミング装置10Aからのファイルを受信する。このとき、プログラミング装置10A,10Bは、ネットワーク上でのコピー、メールでの送付等、何れの方法でグローバル変数群36Xおよびメモリ割付情報15を送受信してもよい。
 (1-b)
 プログラミング装置10Aが、グローバル変数群36Xおよびメモリ割付情報15をPLC20に書き込む。プログラミング装置10Bでは、取得部である通信部32が、プログラミング装置10AによってPLC20に書き込まれたグローバル変数群36Xおよびメモリ割付情報15をPLC20から読み出す。この場合、PLC20は、書き込まれたグローバル変数群36Xおよびメモリ割付情報15がプログラミング装置10Bに読み出された後もグローバル変数群36Xおよびメモリ割付情報15を記憶しておく。
 プログラミング装置10Bは、上述の(1-a)または(1-b)の方法によってコピーしたグローバル変数群36Xを用いて、以下の(2-a)または(2-b)の方法でシーケンスプログラムを作成するとともに、グローバル変数宣言361を変更する。
 (2-a)
 プログラミング装置10Bは、プログラミング装置10Aによって作成されたシーケンスプログラム群35Xの少なくとも一部を編集装置30で更新することによってシーケンスプログラムを作成する。この場合、プログラミング装置10A,10Bは、上述の(1-a)または(1-b)と同様の方法によって、プログラミング装置10Aで作成されたシーケンスプログラム群35Xを、プログラミング装置10Bにコピーする。
 (2-b)
 プログラミング装置10Bは、編集装置30で新たにシーケンスプログラムを作成する。
 プログラミング装置10Bの編集装置30は、(2-a)または(2-b)の方法によって作成したシーケンスプログラムに基づいて、グローバル変数宣言361を変更する。プログラミング装置10Bの実行プログラム生成部16は、(2-a)または(2-b)の方法で作成したシーケンスプログラム、および変更したグローバル変数をコンパイルする。このとき、プログラミング装置10Bの実行プログラム生成部16は、既存のグローバル変数の割付先となっているメモリアドレスに変更があれば、実施の形態1または実施の形態2と同様の方法によってコンパイルを実行する。すなわち、プログラミング装置10Bの実行プログラム生成部16は、元々のメモリアドレスを保持しつつ、新規のメモリアドレスとの間でグローバル変数の値の同期を行う命令を挿入して、実行プログラムEPを生成する。このとき、プログラミング装置10Bのメモリ割付部14は、メモリ割付情報15の更新を行っておく。
 プログラミングシステム1では、上述した処理が実行されることにより、プログラミング装置10Aに影響を与えることなく、プログラミング装置10Bによる処理を実行することができる。具体的には、プログラミング装置10Bは、プログラミング装置10Aに影響を与えることなく、シーケンスプログラムの変更または作成などの処理を実行することができる。これにより、プログラミング装置10Aにおいてコンパイルが不要となるので、プログラミングシステム1は、コンパイルの処理時間を抑制することができる。例えば、プログラミング装置10Aおよびプログラミング装置10Bでコンパイルが実行される場合と比べて、プログラミング装置10Bのみでコンパイルが実行される方が、コンパイルの合計時間が短くなる。
 プログラミングシステム1の動作例について説明する。図3に示したグローバル変数宣言361が、プログラミング装置10A,10Bの両方にあり、図4に示したシーケンスプログラム111Pがプログラミング装置10Bのみにあり、図4に示したシーケンスプログラム111Qがプログラミング装置10Aのみにある状態を想定する。この状態で、プログラミング装置10Bのみが、グローバル変数宣言361を図7に示したグローバル変数宣言362に変更するとともにシーケンスプログラム111Pを図8に示したシーケンスプログラム112Pに変更する場合がある。この場合において、プログラミング装置10BのみでコンパイルおよびPLC20への書込みを実行し、プログラミング装置10AではコンパイルおよびPLC20への書込みを実行しないことで、PLC20内の状態が、図11のようになる。
 このように、実施の形態3では、プログラミング装置10Bは、プログラミング装置10Aに影響を与えることなく、シーケンスプログラムの変更または作成などの処理を実行するので、プログラミング装置10Aでのコンパイルが不要となる。この結果、プログラミングシステム1は、コンパイルの処理時間を抑制することができる。
 ここで、プログラミング装置10X,10Yのハードウェア構成について説明する。なお、プログラミング装置10X,10Yは同様のハードウェア構成を有しているので、ここではプログラミング装置10Xのハードウェア構成について説明する。
 図17は、実施の形態1から3にかかるプログラミング装置のハードウェア構成例を示す図である。プログラミング装置10Xは、図17に示した制御回路300、すなわちプロセッサ301、メモリ302、通信装置304および入力装置303により実現することができる。
 プロセッサ301の例は、CPU(Central Processing Unit、中央処理装置、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、プロセッサ、DSPともいう)またはシステムLSI(Large Scale Integration)である。メモリ302の例は、RAM(Random Access Memory)、またはROM(Read Only Memory)である。入力装置303の例は、キーボード、マウス、またはタッチパネルである。通信装置304は、通信部32の機能を実現する。
 プログラミング装置10Xは、プロセッサ301が、メモリ302から、コンパイラ11Xと、編集装置30の動作を実行するための編集プログラムを読み出して実行することにより実現される。コンパイルプログラムであるコンパイラ11Xは、参照関係管理部12、メモリ割付部14、プログラム選択部17、および実行プログラム生成部16の手順または方法をコンピュータに実行させるものであるともいえる。また、編集プログラムは、編集装置30の手順または方法をコンピュータに実行させるものであるともいえる。メモリ302は、プロセッサ301が各種処理を実行する際の一時メモリにも使用される。
 プロセッサ301が実行するコンパイラ11Xは、コンパイラ11Xが格納された記録媒体であるコンピュータプログラムプロダクトで実現されてもよい。この場合の記録媒体の例は、コンパイラ11Xが格納された非一時的な(non-transitory)コンピュータ可読媒体である。また、プロセッサ301が実行する編集プログラムは、編集プログラムが格納された記録媒体であるコンピュータプログラムプロダクトで実現されてもよい。この場合の記録媒体の例は、編集プログラムが格納された非一時的なコンピュータ可読媒体である。
 なお、プログラミング装置10Xの機能について、一部を専用のハードウェアで実現し、一部をソフトウェアまたはファームウェアで実現するようにしてもよい。
 以上の実施の形態に示した構成は、本発明の内容の一例を示すものであり、別の公知の技術と組み合わせることも可能であるし、本発明の要旨を逸脱しない範囲で、構成の一部を省略、変更することも可能である。
 1 プログラミングシステム、10A,10B,10X,10Y プログラミング装置、11X,11Y コンパイラ、12 参照関係管理部、13 参照関係情報、14 メモリ割付部、15 メモリ割付情報、16 実行プログラム生成部、17 プログラム選択部、18 コンパイルオプション判定部、20 PLC、21 プログラムメモリ、22 通信部、23 プログラム実行部、24 データメモリ、25 不揮発性データメモリ、30 編集装置、31 実行プログラム、32 通信部、35X シーケンスプログラム群、36X グローバル変数群、41 コンパイルオプション、111P,111Q,112P,P,Q シーケンスプログラム、151,152 メモリ割付情報、310 プログラム格納部、361~363 グローバル変数宣言、Aa,Ab,Ac,Ad,Ae メモリアドレス、EP51~EP53,EQ51 実行プログラム。

Claims (10)

  1.  グローバル変数の宣言を含むシーケンスプログラムをコンパイルして制御装置で実行される実行プログラムを生成する処理を、コンピュータに実行させるコンパイラであって、
     前記グローバル変数の宣言の編集前後で、前記グローバル変数に対して割付けられる前記制御装置内のメモリアドレスが変化した場合、編集前のグローバル変数に割付けられるメモリアドレスに格納される第1の値と、編集後のグローバル変数に割付けられるメモリアドレスに格納される第2の値とを同期させる実行コードを、前記編集後のグローバル変数を参照するシーケンスプログラムに対応する実行プログラムに付与する処理を前記コンピュータに実行させる、
     ことを特徴とするコンパイラ。
  2.  前記グローバル変数および前記グローバル変数の宣言を含むシーケンスプログラムが変更または追加されたことを示す変更有無情報に基づいて、複数のシーケンスプログラムを含んだシーケンスプログラム群の中から前記実行コードを付与する対象となる、前記編集後のグローバル変数を参照するシーケンスプログラムを選択可能なことを特徴とする請求項1に記載のコンパイラ。
  3.  前記実行コードは、単一の命令で構成される、
     ことを特徴とする請求項1または2に記載のコンパイラ。
  4.  前記実行コードは、複数の命令で構成される、
     ことを特徴とする請求項1または2に記載のコンパイラ。
  5.  前記編集前のグローバル変数と、前記編集後のグローバル変数とでデータ型が同じである場合、前記実行コードにコピー命令を用いることによって、前記第2の値をコピーして前記編集前のグローバル変数に割付けられるメモリアドレスに書き込むか、または前記第1の値をコピーして前記編集後のグローバル変数に割付けられるメモリアドレスに書き込むことで、前記第2の値と、前記第1の値とを同期させる、
     ことを特徴とする請求項1から4のいずれか1つに記載のコンパイラ。
  6.  前記編集前のグローバル変数と、前記編集後のグローバル変数とで、データ型が異なる場合、前記実行コードにデータ型を変換して値を書き込む命令を用いることによって、前記第2の値をコピーしたうえでデータ型を変換して前記編集前のグローバル変数に割付けられるメモリアドレスに書き込むか、または前記第1の値をコピーしたうえでデータ型を変換して、前記編集後のグローバル変数に割付けられるメモリアドレスに書き込むことで、前記第2の値と、前記第1の値とを同期させる、
     ことを特徴とする請求項1から4のいずれか1つに記載のコンパイラ。
  7.  請求項1に記載のコンパイラと、
     ユーザからの指示に従って、前記グローバル変数および前記グローバル変数の宣言を含むシーケンスプログラムを編集するとともに、ユーザからの指示に従って、複数のシーケンスプログラムを含んだシーケンスプログラム群の中から前記実行コードを付与する対象となる、前記編集後のグローバル変数を参照するシーケンスプログラムを選択可能な編集装置と、
     を備えることを特徴とするプログラミング支援装置。
  8.  グローバル変数の宣言を含むシーケンスプログラムをコンパイルして制御装置で実行される実行プログラムを生成するコンパイラを備えるプログラミング支援装置であって、
     当該プログラミング支援装置とは別のプログラミング支援装置によって宣言された前記グローバル変数と、前記グローバル変数に対して割付けられる前記制御装置内のメモリアドレス割付けられる前記制御装置内のメモリアドレスと、を取得する取得部を備え、
     前記コンパイラは、
     前記グローバル変数の宣言の編集前後で、前記グローバル変数に対して割付けられる前記制御装置内のメモリアドレスが変化した場合、編集前のグローバル変数に割付けられるメモリアドレスに格納される第1の値と、編集後のグローバル変数に割付けられるメモリアドレスに格納される第2の値とを同期させる実行コードを、前記編集後のグローバル変数を参照するシーケンスプログラムに対応する実行プログラムに付与する、
     ことを特徴とするプログラミング支援装置。
  9.  前記取得部は、前記別のプログラミング支援装置から、前記グローバル変数と、前記グローバル変数に対して前記制御装置内のメモリに割付けられるメモリアドレスと、を受信する、
     ことを特徴とする請求項8に記載のプログラミング支援装置。
  10.  前記取得部は、前記別のプログラミング支援装置によって生成された実行プログラムが書き込まれた前記制御装置から、前記グローバル変数と、前記グローバル変数に対して前記制御装置内のメモリに割付けられるメモリアドレスと、を読み出す、
     ことを特徴とする請求項8に記載のプログラミング支援装置。
PCT/JP2018/018352 2018-05-11 2018-05-11 コンパイラおよびプログラミング支援装置 WO2019215919A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
US16/346,546 US10802808B2 (en) 2018-05-11 2018-05-11 Compiler and programming support device
CN201880004856.2A CN110720081B (zh) 2018-05-11 2018-05-11 编译器及编程辅助装置
DE112018000198.9T DE112018000198T5 (de) 2018-05-11 2018-05-11 Compiler und Programmierungsunterstützungsgerät
JP2018552266A JP6452924B1 (ja) 2018-05-11 2018-05-11 コンパイラおよびプログラミング支援装置
PCT/JP2018/018352 WO2019215919A1 (ja) 2018-05-11 2018-05-11 コンパイラおよびプログラミング支援装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/018352 WO2019215919A1 (ja) 2018-05-11 2018-05-11 コンパイラおよびプログラミング支援装置

Publications (1)

Publication Number Publication Date
WO2019215919A1 true WO2019215919A1 (ja) 2019-11-14

Family

ID=65020495

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/018352 WO2019215919A1 (ja) 2018-05-11 2018-05-11 コンパイラおよびプログラミング支援装置

Country Status (5)

Country Link
US (1) US10802808B2 (ja)
JP (1) JP6452924B1 (ja)
CN (1) CN110720081B (ja)
DE (1) DE112018000198T5 (ja)
WO (1) WO2019215919A1 (ja)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09101897A (ja) * 1995-07-07 1997-04-15 Sun Microsyst Inc オブジェクト指向c++言語のソースコードから実行可能コードを生成する方法および装置
JP2000284815A (ja) * 1999-03-30 2000-10-13 Fuji Electric Co Ltd プログラム作成装置
JP2001290656A (ja) * 2000-04-07 2001-10-19 Hitachi Ltd 差分コンパイル方式
WO2008102426A1 (ja) * 2007-02-19 2008-08-28 Mitsubishi Electric Corporation プログラマブルコントローラの周辺装置、置換方法およびプログラム
JP2013025353A (ja) * 2011-07-15 2013-02-04 Omron Corp Plcのcpuユニット、plc用のシステムプログラム、plc用のシステムプログラムを格納した記録媒体、plcシステム、plcサポート装置、plcサポートプログラム、および、plcサポートプログラムを格納した記録媒体
JP2015022511A (ja) * 2013-07-18 2015-02-02 富士電機株式会社 プログラマブルコントローラシステム、その支援装置、プログラム
JP2015215865A (ja) * 2014-04-24 2015-12-03 富士電機株式会社 プログラマブルコントローラシステム、その支援装置、プログラマブルコントローラ

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2321016A1 (en) * 2000-09-27 2002-03-27 Ibm Canada Limited-Ibm Canada Limitee Interprocedural dead store elimination
JP3783553B2 (ja) 2000-11-15 2006-06-07 株式会社デンソー 情報処理装置
US8381174B2 (en) * 2007-10-31 2013-02-19 National Instruments Corporation Global variable structure in a graphical program
JP4957853B1 (ja) * 2011-03-15 2012-06-20 オムロン株式会社 Plcのcpuユニット、plc用のシステムプログラムおよびplc用のシステムプログラムを格納した記録媒体
CN104204975B (zh) * 2012-03-26 2016-10-12 三菱电机株式会社 定序程序调试辅助装置
US10353679B2 (en) * 2014-10-31 2019-07-16 Microsoft Technology Licensing, Llc. Collecting profile data for modified global variables
JP2017142767A (ja) * 2016-02-09 2017-08-17 富士電機株式会社 コントローラシステム、変数連携支援装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09101897A (ja) * 1995-07-07 1997-04-15 Sun Microsyst Inc オブジェクト指向c++言語のソースコードから実行可能コードを生成する方法および装置
JP2000284815A (ja) * 1999-03-30 2000-10-13 Fuji Electric Co Ltd プログラム作成装置
JP2001290656A (ja) * 2000-04-07 2001-10-19 Hitachi Ltd 差分コンパイル方式
WO2008102426A1 (ja) * 2007-02-19 2008-08-28 Mitsubishi Electric Corporation プログラマブルコントローラの周辺装置、置換方法およびプログラム
JP2013025353A (ja) * 2011-07-15 2013-02-04 Omron Corp Plcのcpuユニット、plc用のシステムプログラム、plc用のシステムプログラムを格納した記録媒体、plcシステム、plcサポート装置、plcサポートプログラム、および、plcサポートプログラムを格納した記録媒体
JP2015022511A (ja) * 2013-07-18 2015-02-02 富士電機株式会社 プログラマブルコントローラシステム、その支援装置、プログラム
JP2015215865A (ja) * 2014-04-24 2015-12-03 富士電機株式会社 プログラマブルコントローラシステム、その支援装置、プログラマブルコントローラ

Also Published As

Publication number Publication date
US10802808B2 (en) 2020-10-13
CN110720081B (zh) 2022-05-03
CN110720081A (zh) 2020-01-21
JPWO2019215919A1 (ja) 2020-05-28
US20200264854A1 (en) 2020-08-20
JP6452924B1 (ja) 2019-01-16
DE112018000198T5 (de) 2019-12-24

Similar Documents

Publication Publication Date Title
JP2005032259A (ja) 共有ライブラリーシステム及び前記システム構築方法
JP4638484B2 (ja) データ処理装置におけるデータ整合性
JP5790128B2 (ja) プログラマブルコントローラ・システム、その支援装置
JP2006092544A (ja) プリオペレーティングシステム環境におけるモジュールの動的リンク
KR20090010942A (ko) 프로그래머블 컨트롤러의 주변 장치, 치환 방법 및프로그램
JP5757098B2 (ja) プログラム作成支援装置、プログラム作成支援方法
JP6292096B2 (ja) プログラマブルコントローラシステム、その支援装置
JP6452924B1 (ja) コンパイラおよびプログラミング支援装置
JP4319082B2 (ja) プログラミングシステム
US10048953B2 (en) Compiler program, compiling method, and compiling device
JP6299095B2 (ja) 共有データ定義支援システム、そのマスタ装置、ローカル端末、プログラム
JP2008198143A (ja) プログラマブルコントローラ用プログラム作成支援装置およびプログラム作成支援方法
JP6455096B2 (ja) コントロールシステム、その支援装置、プログラマブルコントロール装置
JP6071782B2 (ja) プラント制御装置、プラント制御方法及びプラント制御プログラム
WO2022269793A1 (ja) 制御装置、及び、アドレス管理方法
CN108008981B (zh) 一种片上系统SoC中进行程序初始化的方法和装置
JP6628951B1 (ja) プログラム作成支援装置、プログラム作成支援方法およびプログラム
CN112558944B (zh) 一种app生成方法、装置、处理设备及计算机可读存储介质
JP6020071B2 (ja) プログラマブルコントローラシステム、その支援装置、プログラマブルコントローラ
JP2009098963A (ja) モジュール自動生成システム
JP2016151973A (ja) 制御コントロールシステム、その開発支援装置、制御装置
JP2024004945A (ja) 設計装置および設計方法
CN114675857A (zh) 控制系统、控制方法及数据存储区的分配方法
JP2022018696A (ja) 制御プログラム生成装置
JPWO2016110983A1 (ja) システム設計支援ツール

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018552266

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: 18918400

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 18918400

Country of ref document: EP

Kind code of ref document: A1