WO2023135735A1 - プログラミング支援プログラム、プログラミング支援方法及びプログラミング支援装置 - Google Patents

プログラミング支援プログラム、プログラミング支援方法及びプログラミング支援装置 Download PDF

Info

Publication number
WO2023135735A1
WO2023135735A1 PCT/JP2022/001083 JP2022001083W WO2023135735A1 WO 2023135735 A1 WO2023135735 A1 WO 2023135735A1 JP 2022001083 W JP2022001083 W JP 2022001083W WO 2023135735 A1 WO2023135735 A1 WO 2023135735A1
Authority
WO
WIPO (PCT)
Prior art keywords
source code
function block
function
instance
description
Prior art date
Application number
PCT/JP2022/001083
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 PCT/JP2022/001083 priority Critical patent/WO2023135735A1/ja
Priority to JP2022535791A priority patent/JP7126637B1/ja
Publication of WO2023135735A1 publication Critical patent/WO2023135735A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/51Source to source
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Definitions

  • the present disclosure relates to programming support programs, programming support methods, and programming support devices.
  • IEC61131-3 for example, is known as a programming language standard for creating operating programs.
  • the third edition of IEC61131-3 introduces object-oriented programming, and introduces object-oriented function blocks extended from conventional function blocks corresponding to subroutines defined in the second edition.
  • the present disclosure has been made in view of the above circumstances, and aims to reduce the burden of creating an operation program for a programmable controller.
  • the programming support program of the present disclosure provides a computer that supports creation of an operation program for operating a programmable controller, acquiring means for acquiring a first source code of the operation program, function blocks that are subroutines, replacing a first function block whose function is described in a first source code in a format different from one or more methods included in the function block with a second function block whose function is described as a method or by replacing the description of the first instance declared based on the first function block in the first source code with the description about the second instance declared based on the second function block, It functions as generation means for generating the second source code of the operating program.
  • FIG. 1 shows a functional configuration of a programming support device according to Embodiment 1;
  • FIG. 1 shows a hardware configuration of a programming support device according to Embodiment 1;
  • FIG. 11 is a diagram showing an example of a screen for selecting a conventional function block according to Embodiment 1;
  • FIG. 2 shows a comparison between the first source code and the second source code according to the first embodiment;
  • Flowchart showing support processing according to Embodiment 1 Flowchart showing generation processing according to the first embodiment FIG.
  • FIG. 4 shows a functional configuration of a programming support device according to a second embodiment
  • a diagram showing an example of the first source code according to the second embodiment A diagram showing an example of a screen for allocating instances according to the second embodiment
  • a diagram showing an example of the second source code according to the second embodiment Flowchart showing support processing according to Embodiment 2
  • FIG. 11 is a diagram showing a functional configuration of a programming support device according to Embodiment 3;
  • FIG. 11 is a diagram showing a comparison between the first source code and the second source code according to the modified example;
  • This programming support device is a device that supports creation of an operating program for a programmable controller by converting non-object-oriented source code into object-oriented source code.
  • the programming support device 10 is an industrial PC (Personal Computer) capable of executing software that functions as an engineering tool for editing source code, or a server device on a network. As shown in FIG. 1, the programming support device 10 reads the first source code 21 in the project data 20 stored in the storage device 200, and reads the second source code 22 based on the read first source code 21. and write the generated second source code 22 into the project data 20 .
  • industrial PC Personal Computer
  • the storage device 200 may be a memory card removable from the programming support device 10, or may be a device connected to the programming support device 10 via a network. Moreover, although the storage device 200 is arranged outside the programming support device 10 in FIG. 1 , the programming support device 10 may incorporate the storage device 200 .
  • the project data 20 is a set of data used by the programmable controller and includes an operation program for operating the programmable controller.
  • the number of operation programs included in the project data 20 may be one or plural.
  • the operating program includes object files that are directly executed by the programmable controller, as well as various source codes that are compiled to obtain the object files.
  • the operating program includes external programs and library data that are referred to as needed, in addition to a single program that is initially executed by the programmable controller.
  • the project data 20 includes a first source code 21, a second source code 22, and an execution program 23 as operating programs.
  • the first source code 21 and execution program 23 are created by a user using an engineering tool.
  • the first source code 21 is data describing definitions of function blocks corresponding to non-object-oriented subroutines.
  • a function block is one or more reusable instructions for performing a predefined function when called from another program.
  • the function block defined in the first source code 21 may be a function block defined by IEC61131-3 second edition, a function defined by IEC61131-3 standard, or a subroutine. Other equivalent programming language elements are also possible.
  • the function block will be abbreviated as FB, and the IEC61131-3 standard may be abbreviated as the IEC standard.
  • a non-object-oriented FB is appropriately described as a conventional FB.
  • the FB included in the first source code 21 is a conventional FB.
  • the second source code 22 is data describing an object-oriented FB definition. Specifically, the second source code 22 describes the definition of an object-oriented FB having methods. A method is similar to a conventional FB in that it is one or more reusable instructions for performing a function in advance by being called from another program, but is a declared member function of an instance of an object-oriented FB. It is different from the conventional FB in that it is called as While a conventional FB corresponds to one integrated function, an object-oriented FB may contain multiple methods corresponding to the function.
  • the object-oriented FB defined in the second source code 22 may be defined in the 3rd edition of the IEC standard, may be a class defined in the 3rd edition, or may have a method It may be any other programming language element that has
  • a conventional FB is an example of a first function block in which the function of a function block, which is a subroutine, is described in a format different from that of one or more methods included in the function block.
  • the object-oriented FB is an example of a second function block whose function is described as a method.
  • the execution program 23 is an operating program that uses the instance of the conventional FB defined in the first source code 21.
  • a programming language for writing the first source code 21, the second source code 22, and the execution program 23 any of the instruction list, structured text, ladder diagram, function block diagram, and sequential function chart specified by the IEC standard is adopted. or other languages may be adopted.
  • the programming support device 10 is configured as a computer that executes an engineering tool that generates the second source code 22 from the first source code 21.
  • the programming support apparatus 10 includes a processor 31, a main storage unit 32, an auxiliary storage unit 33, an input unit 34, an output unit 35, and a communication device, as shown in FIG. a portion 36;
  • the main storage section 32 , auxiliary storage section 33 , input section 34 , output section 35 and communication section 36 are all connected to the processor 31 via an internal bus 37 .
  • the processor 31 includes a CPU (Central Processing Unit) as a processing circuit.
  • the processor 31 implements various functions of the programming support device 10 by executing the program P1 stored in the auxiliary storage unit 33, and executes processing described later.
  • CPU Central Processing Unit
  • the main storage unit 32 includes a RAM (Random Access Memory).
  • a program P1 is loaded from the auxiliary storage unit 33 into the main storage unit 32 .
  • the main storage unit 32 is used as a work area for the processor 31 .
  • the program P1 corresponds to an engineering tool, and corresponds to an example of a programming support program that generates the second source code 22 . Although one program P1 is representatively shown in FIG. 2, there may be a plurality of programs P1.
  • the auxiliary storage unit 33 includes non-volatile memory represented by EEPROM (Electrically Erasable Programmable Read-Only Memory) and HDD (Hard Disk Drive).
  • the auxiliary storage unit 33 stores various data used for the processing of the processor 31 in addition to the program P1.
  • Auxiliary storage unit 33 supplies data used by processor 31 to processor 31 and stores the data supplied from processor 31 in accordance with instructions from processor 31 .
  • the input unit 34 includes input devices typified by a keyboard and pointing device.
  • the input unit 34 acquires information input by the user of the programming support device 10 and notifies the processor 31 of the acquired information.
  • the output unit 35 includes output devices typified by an LCD (Liquid Crystal Display) and a speaker.
  • the output unit 35 presents various information to the user according to instructions from the processor 31 .
  • the communication unit 36 has a network interface circuit for communicating with external devices. Communication unit 36 receives a signal from the outside and outputs information indicated by this signal to processor 31 . The communication unit 36 also transmits a signal indicating information output from the processor 31 to an external device.
  • the input unit 34 and the output unit 35 correspond to the UI (User Interface) of the programming support device 10.
  • the programming support device 10 may be connected to an external UI device via the communication unit 36 to acquire information from the user and provide information to the user via the communication unit 36 .
  • the communication unit 36 that cooperates with an external UI device is used as the UI of the programming support device 10 instead of the input unit 34 and the output unit 35, the input unit 34 and the output unit 35 may be omitted.
  • the programming support device 10 is a stand-alone device that does not communicate with an external device, the communication unit 36 may be omitted.
  • the programming support device 10 has a functional configuration realized by cooperation of the hardware configurations described above. Specifically, the programming support device 10 includes an acquisition unit 11 that acquires a first source code 21, a UI unit 12, a generation unit 13 that generates a second source code 22 based on an input from the user, have
  • the acquisition unit 11 is mainly implemented by the processor 31 . Note that when the acquisition unit 11 acquires the first source code 21 by communicating with the storage device 200 , the acquisition unit 11 is implemented by cooperation between the processor 31 and the communication unit 36 . The acquisition unit 11 acquires the first source code 21 by reading the project data 20 from the address of the storage device 200 specified by the user. The acquisition unit 11 also outputs the read project data 20 to the UI unit 12 and outputs the first source code 21 to the generation unit 13 .
  • the obtaining unit 11 corresponds to an example of obtaining means for obtaining the first source code of the operating program in the programming support device 10 .
  • the UI unit 12 may be realized mainly by the cooperation of the input unit 34 and the output unit 35, or may be realized by the communication unit 36 that cooperates with an external UI device as described above.
  • the UI unit 12 displays the configuration of the project data 20 and receives from the user a selection of a conventional FB to be replaced with an object-oriented FB method.
  • a conventional type FB 211 called “positioning data setting”
  • a conventional type FB 212 called “positioning operation start”
  • the conventional type FB 213 “Temperature adjustment start” is displayed.
  • One or more conventional FBs can be selected from this list.
  • the conventional FBs 211 and 211 selected by the user are hatched.
  • the UI unit 12 displays a submenu 121 including a list of operations related to the selected conventional FB 211, 212.
  • the UI section 12 accepts the selection of the conventional FBs 211 and 212 as targets to be converted into object-oriented FBs.
  • the UI unit 12 corresponds to an example of receiving means for receiving selection of the first function block from the function blocks included in the first source code in the programming support device 10 .
  • the UI unit 12 receives selection of variables to be shared as member variables of the object-oriented FB from among the selected variables of the conventional FB.
  • the screen 120 displays an input field 122 for entering the name of a newly created object-oriented FB and a table 123 showing variables included in the conventional FB.
  • the conventional type FB 211 includes declarations of a variable 2111 called "unit information" and a variable 2112 called “data No.” 2121 and a variable 2122 called "Startup No".
  • the table 123 in FIG. 4 lists these variables 2111, 2112, 2121, and 2122.
  • This table 123 includes a check box column 124 for selecting variables to be shared. For the variables selected by the user by checking the check boxes, the names of the variables that are shared in the object-oriented FB are set by the user in column 125 .
  • the variables 2111 and 2121 called "unit information" of the conventional type FBs 211 and 212 are substantially the same variables, in the newly created object-oriented FB named "positioning unit" It is shown that they are integrated into a variable called "unit information".
  • variable 2112 "data number” and the variable 2122 "startup number” are different information unique to the conventional type FBs 211 and 212, respectively, and are not shared.
  • the button 126 When the user presses the button 126, the selection of the conventional FB and the setting of variables to be shared are completed.
  • the generator 13 is mainly realized by the processor 31.
  • the generation unit 13 generates the second source code 22 from the first source code 21 based on the content set by the user using the UI unit 12 .
  • the newly created object-oriented FB 220 has a method 221 corresponding to the conventional FB 211 and a method 222 corresponding to the conventional FB 212.
  • the logic description 2212 specifying the function of the method 221 has the same content as the corresponding logic description 2113 of the conventional FB 211 .
  • the logic description 2222 specifying the function of the method 222 has the same content as the logic description 2123 of the corresponding conventional FB 212 .
  • the object-oriented FB 220 includes a declaration of a common variable 2201 in which the variables 2111 and 2121 of the conventional FBs 211 and 212 are integrated.
  • the method 221 includes a declaration of a variable 2211 corresponding to the variable 2112 excluded from the common variable setting among the variables 2111 and 2112 of the corresponding conventional FB 211 .
  • the method 222 includes a declaration of a variable 2221 corresponding to the variable 2122 excluded from the common variable setting among the variables 2121 and 2122 of the corresponding conventional type FB 212 .
  • the generation unit 13 then outputs the generated second source code 22 to the storage device 200 .
  • the generator 13 replaces the first function block described in the first source code with the second function block in the programming support device 10 to generate the second source code of the operating program for operating the programmable controller. It corresponds to an example of generating means for
  • the support processing executed by the programming support device 10 will be explained using FIGS.
  • This support processing is started by a specific operation by the user.
  • the support process corresponds to an example of a programming support method for supporting creation of an operation program.
  • the acquisition unit 11 of the programming support device 10 acquires the first source code 21 as shown in FIG. 6 (step S1). Then, the UI unit 12 receives the selection of the conventional FB in the first source code 21 acquired in step S1 (step S2), and commonizes the variables of the conventional FB selected in step S2. A power variable selection is accepted (step S3).
  • the generation unit 13 executes generation processing for generating the second source code 22 from the first source code 21 obtained in step S1 based on the selections accepted in steps S2 and S3 (step S4). .
  • the generation unit 13 outputs the generated second source code 22 (step S5). After that, the support process ends.
  • FIG. 7 shows details of the generation process in step S4.
  • the generation unit 13 generates an empty object-oriented FB (step S11), and registers the common variable set in step S3 in the generated object-oriented FB (step S12).
  • a description declaring the common variable 2201 is added to the object-oriented FB.
  • the generation unit 13 selects one conventional FB that has not been selected in the generation process from the conventional FBs selected in step S2 (step S13). For example, the generator 13 selects the conventional FB 211 shown in FIG.
  • the generation unit 13 generates an empty method (step S14), and inserts the logic description of the conventional FB selected in step S13 as the logic description of the method generated in step S14 (step S15). As a result, in the example of FIG. 5, the logic description 2212 of the method 221 is added.
  • the generation unit 13 selects one variable that has not been selected in the generation process from the variables included in the conventional FB selected in step S13 (step S16). For example, the generator 13 selects the variable 2111 of the conventional FB 211 shown in FIG.
  • the generation unit 13 determines whether the variable selected in step S16 corresponds to the common variable set in step S3 (step S17). If it is determined that the selected variable corresponds to the common variable (step S17; Yes), the generation unit 13 determines whether the name of the variable selected in step S16 is the same as the name of the common variable (step S18).
  • step S18 If it is determined that the names are the same (step S18; Yes), the generation unit 13 proceeds to step S20. On the other hand, if it is determined that the names are not the same (step S18; No), the generation unit 13 replaces the name of the variable selected in step S16 appearing in the logic description of the method with the name of the corresponding common variable (step S19). As a result, the description regarding the variable inserted in step S15 is corrected to the description regarding the common variable.
  • a description about a variable may be a description for accessing the variable, or may be another description using the variable.
  • step S20 determines whether or not all the variables of the conventional FB selected in step S13 have been selected. If it is determined that the selection of all variables has not been completed (step S20; No), the generating unit 13 repeats the processes after step S16. As a result, for example, the variable 2112 of the conventional FB 211 shown in FIG.
  • step S17 If it is determined in step S17 that the variable does not correspond to the common variable (step S17; No), the generation unit 13 registers the variable selected in step S16 in the method generated in step S14 (step S21). . As a result, a description about the variable 2211 is added to the method 221 shown in FIG. 5, for example.
  • step S20 When it is determined in step S20 that all variables have been selected (step S20; Yes), the generation unit 13 adds the methods generated in steps S14 to S20 to the object-oriented FB (step S22). As a result, the method 221 shown in FIG. 5, for example, is added to the object-oriented FB 220.
  • FIG. 5 the method 221 shown in FIG. 5, for example, is added to the object-oriented FB 220.
  • the generation unit 13 determines whether or not all the conventional FBs selected in step S2 have been selected in the generation process (step S23). If it is determined that all the conventional FBs have not been selected (step S23; No), the generation unit 13 repeats the processes after step S13. As a result, the method 222 shown in FIG. 5, for example, is added to the object-oriented FB 220 . On the other hand, if it is determined that all the conventional FBs have been selected (step S23; Yes), the second source code 22 that defines the object-oriented FB 220 is generated, and the processing by the programming support device 10 begins with the generation processing shown in FIG. return to the support process shown in .
  • the programming support device 10 by replacing the non-object-oriented conventional FB described in the first source code 21 with the method of the object-oriented FB, A second source code 22 describing the object-oriented FB can be obtained. Therefore, it is possible to reduce the burden of creating an operation program for the programmable controller and promote the transition to object-oriented programming.
  • a programmable controller usually includes multiple units.
  • the execution program 23 describes a declaration of a different instance for each function of the unit, Similar information about the units needs to be set, which complicates the execution program 23 .
  • the programming support device 10 if a plurality of conventional FBs are replaced with a plurality of functions of one object-oriented FB by the programming support device 10 according to the present embodiment, common data is set each time a method is called in the execution program 23. Therefore, the first source code 41 can be simplified.
  • the UI unit 12 corresponds to an example of a reception unit that receives selection of a plurality of first function blocks included in the first source code as selection elements, and the generation unit 13 receives a plurality of first function blocks selected from the first source code. It corresponds to an example of generating means for generating the second source code by replacing the function block with one second function block containing a plurality of methods corresponding to each of the first function blocks.
  • the generating unit 13 corresponds to an example of generating means for replacing a plurality of first function blocks with second function blocks including common variables corresponding to different variables included in the first function blocks.
  • the programming support device 10 may set the name of the object-oriented FB and the name of the common variable according to a predetermined naming rule.
  • name of the method of the object-oriented FB is set by the programming support device 10 as being similar to the name of the conventional FB, but these names may be the same, or the method may be changed by the user. name may be set.
  • the generation unit 13 may analyze the execution program 23 and set the input variables or output variables of the conventional FB to which the same data is connected as common variables. If the selection of the common variable and the setting of the name of the object-oriented FB are performed by the programming support device 10 rather than by the user, the display of the dialog screen shown in FIG. 4 is omitted.
  • Embodiment 2 Next, the second embodiment will be described, focusing on differences from the first embodiment described above. It should be noted that the same or equivalent configurations as those of the first embodiment are denoted by the same reference numerals, and the explanations thereof are omitted or simplified. This embodiment differs from the first embodiment in that instead of replacing the description defining the FB, the description regarding the instance declared based on the FB is replaced.
  • the programming support device 10 reads the non-object-oriented first source code 41 included in the project data 20 stored in the storage device 200, and reads the read first source code 41.
  • a second object-oriented source code 42 is generated from the source code 41 and output.
  • Both the first source code 41 and the second source code 42 correspond to the execution program 23 according to the first embodiment.
  • the first source code 41 includes descriptions of conventional FB instances.
  • the description about the instance may be a declaration of the instance, or a description for accessing variables or logic descriptions of the instance.
  • the second source code 42 corresponds to the first source code 41 in which the description of the conventional FB instance is replaced with the description of the object-oriented FB instance.
  • the project data 20 includes related information 43.
  • the related information 43 is information indicating the correspondence relationship between the conventional FB and the object-oriented FB for replacing the description about the instance. Specifically, the related information 43 indicates the correspondence between conventional FBs and methods of object-oriented FBs, and the correspondence between variables of conventional FBs and common variables of object-oriented FBs. For example, the related information 43, as shown in FIG. shown in association.
  • the related information 43 may be generated by the generating unit 13 according to Embodiment 1, or may be provided from the outside without being generated by the programming support device 10.
  • FIG. 8 exemplifies the project data 20 including the related information 43 in advance
  • any method of providing the related information 43 to the programming support device 10 is possible.
  • an FB library containing the relevant information 43 may be imported into the project data 20, or the relevant information 43 may be contained in an FB provided by a manufacturer of FA equipment including programmable controllers.
  • the association information 43 corresponds to an example of information that associates variables included in the conventional FB as the first function block and variables included in the object-oriented FB as the second function block.
  • the acquisition unit 11 of the programming support device 10 acquires the first source code 41 and related information 43 and provides them to the UI unit 12 .
  • the acquiring unit 11 corresponds to an example of acquiring means for acquiring related information in which the function of the first function block and the second function block including the function as a method are associated with each other in the programming support device 10 .
  • the UI unit 12 includes a program editor 141 for editing the first source code 41, an allocation unit 142 for allocating instances to be replaced, have
  • the program editor 141 accepts designation of an object-oriented FB instance described in the first source code 41 acquired by the acquisition unit 11 .
  • the program editor 141 displays the contents of the first source code 41 on the screen 120 as shown in FIG.
  • This first source code 41 includes variables 411 and 414 substantially common to the conventional FBs 211 and 212, variables 412 and 415 corresponding to instances of the conventional FB 211, variables 413 corresponding to instances of the conventional FB 212, 416 and contains a description of Variables 411-413 are variables relating to "A unit”, and variables 414-416 are variables relating to "B unit".
  • the first source code 41 includes a description declaring an instance 417 of the object-oriented FB 220.
  • the description about this instance 417 is added by the user who operates the program editor 141 after the first source code 41 is acquired by the acquisition unit 11 .
  • the first source code 41 stored in the storage device 200 may contain the description of the instance 417 in advance. If the description of the instance 417 is included in advance, the UI unit 12 may be configured without the program editor 141 .
  • the logic description 418 is described in the structured text format defined by the IEC standard, but may be described in other formats.
  • the program editor 141 When the user selects an instance 417 in the first source code 41, the program editor 141 displays a submenu 127 containing a list of operations for that instance 417. When "replace with this instance" is specified from the list of the submenu 127, the program editor 141 accepts the specification of the object-oriented FB instance 417 to replace the conventional FB instance, and replaces the specified instance. The allocation unit 142 is notified.
  • the allocation unit 142 accepts the allocation of the conventional FB instance to the method of the specified instance of the object-oriented FB. More specifically, the allocation unit 142 receives from the user a selection of a related conventional FB instance in the related information 43 with the object-oriented FB method for which the instance is specified. For example, as shown in FIG. 10, the allocation unit 142 displays on the screen 120 a table 128 that associates methods with selection fields for conventional FB instances to be allocated. The user uses this table 128 to assign the method of the specified object-oriented FB instance to the conventional FB instance.
  • the option of the conventional type FB instance displayed as an allocation candidate is a variable whose data type is the conventional type FB, which is within the scope of the first source code 41 and is associated with the method in the related information 43. .
  • the methods included in the table 128 are the methods 221, 222 becomes.
  • the instances included in the table 128 are described in the first source code 41 as the instances of the conventional FBs 211 and 212 corresponding to the methods 221 and 222 as shown in FIG.
  • the instances related to the "A unit” and “B unit” of the conventional FB 211 are declared as variables 412 and 415, respectively, and the "A unit” and "B unit” of the conventional FB 212 are declared as variables 413,416.
  • FIG. 9 the instances related to the "A unit” and "B unit” of the conventional FB 211 are declared as variables 412 and 415, respectively, and the "A unit” and "B unit” of the conventional FB 212 are declared as variables 413,416.
  • the instance "A unit positioning operation start” corresponding to the variable 413 and the instance “B unit positioning operation start” corresponding to the variable 416 is listed in the combo box as a candidate for assignment. It is indicated by hatching that the instance "A unit positioning operation start” in this list has been selected by the user as an allocation target. Further, it is indicated that "A unit positioning data setting” is assigned to the "data setting method”. When the user presses the button 129 , the content set using the table 128 is notified to the generation unit 13 .
  • the UI unit 12 including the program editor 141 and the allocation unit 142 accepts the specification of the second instance described in the first source code in the programming support device 10, and associates the method of the specified second instance with related information. It corresponds to an example of receiving means for receiving selection of a conventional FB instance having the specified function.
  • the generation unit 13 includes a static analysis unit 131 that statically analyzes the first source code 41 and corrects the description regarding the conventional FB instance described in the first source code 41 to the description regarding the object-oriented FB instance.
  • a correction unit 132 that have
  • the static analysis unit 131 determines whether the conventional FB instance allocated by the allocation unit 142 can be replaced with the object-oriented FB method. In addition, the static analysis unit 131 determines that the operation of the programmable controller based on the replacement code obtained by replacing the conventional FB instance described in the first source code 41 with the method of the object-oriented FB is the first source code 41 It is determined whether there is a change from the operation of the programmable controller based on If the replacement is possible and there is no change in operation, the static analysis unit 131 permits the modification unit 132 to modify the first source code 41, and allows the modification unit 132 to modify the second source code 42. to generate
  • the static analysis unit 131 notifies the user that the replacement is not possible, and if the action changes, notifies the user that the action will change.
  • the notification to the user may be made via the UI unit 12, or may be made by another method.
  • the generation unit 13 having the static analysis unit 131 is a programmable controller that follows the replacement code in which the description for calling the function of the first function block in the first source code is replaced with the description for calling the method of the second function block. is different from the operation of the programmable controller according to the first source code, it corresponds to an example of generating means for notifying that the operation changes due to the replacement.
  • the generation unit 13 provides information indicating that the variable is not replaced. It corresponds to an example of generating means for reporting.
  • the modification unit 132 modifies the description of the conventional FB instance in the first source code 41 to the description of the object-oriented FB instance.
  • An instance of a conventional FB is used to call a logic description indicating the functions of the conventional FB or to access variables of the conventional FB.
  • the correction unit 132 replaces the description that calls the logic description of the conventional FB with the description that calls the method of the object-oriented FB. Also, the correction unit 132 replaces the description for accessing the variable of the conventional FB with the description for accessing the variable of the object-oriented FB.
  • the correction unit 132 deletes from the first source code 41 the description declaring the successfully replaced conventional FB instance.
  • the generation unit 13 having the correction unit 132 corresponds to an example of generation means for replacing the description for calling the function of the first function block in the first source code with the description for calling the method of the second function block.
  • the generating unit 13 corresponds to an example of generating means for replacing the description of the variables included in the first function block in the first source code with the description of the variables included in the second function block.
  • FIG. 11 illustrates the second source code 42 generated by correcting the first source code 41 shown in FIG.
  • declarations of variables 412 and 413 corresponding to conventional FB instances related to "A unit" are deleted.
  • the logic description 418 is modified to the logic description 419 .
  • the parameter when a parameter specified when calling a logic description is a common variable, the parameter is deleted from one or more parameters specified when calling a corresponding method. , inserts a description of a detached assignment.
  • substantially identical descriptions 4191 and 4192 are generated as a result of the disjunctive substitution, the correction unit 132 may perform an optimization process to simplify such redundant descriptions.
  • the acquisition unit 11 acquires the first source code 41 (step S31). Then, the program editor 141 of the UI unit 12 receives the designation of the object-oriented FB instance to be replaced (step S32), and the allocation unit 142 receives the selection of the conventional FB instance to be replaced (step S33).
  • the generation unit 13 executes generation processing for generating the second source code 42 from the first source code 41 acquired in step S31 based on the contents received in steps S32 and S33 (step S34). Then, the generation unit 13 outputs the generated second source code 42, and the support processing ends.
  • FIG. 13 shows details of the generation process executed in step S34.
  • the generation unit 13 selects one of the conventional FB instances allocated in step S33 that has not been selected in the generation process (step S41). For example, "A unit positioning data setting" shown in FIG. 10 is selected.
  • the generation unit 13 searches the first source code 41 for all usage locations of the instance selected in step S41 (step S42). As a result, in the example of FIG. 9, descriptions 4181 and 4182 using "A unit positioning data setting" are hit. Note that the description declaring the variable 412 corresponding to the instance of the conventional FB is excluded from the search targets.
  • the static analysis unit 131 of the generation unit 13 selects one usage location that has not been selected in the generation processing from the usage locations hit by the search (step S43). Then, the static analysis unit 131 determines whether or not the usage location selected in step S43 is a description of a call expression (step S44). Specifically, it is determined whether or not this usage location calls the logic description of the conventional type FB instance. When the usage location selected in step S43 is the description 4181 in FIG. 9, the description 418 accesses an instance variable rather than a call expression, so the determination in step S44 is negative.
  • step S44 If it is determined that the selected usage location is not a description of a call expression (step S44; No), the static analysis unit 131 determines that this usage location is a description of variable access, and shares the variables to be accessed. It is determined whether or not it is a variable (step S45). As for the description 4181 in FIG. 9, the "unit information" corresponds to the common variable as shown in FIG. 5, so the determination in step S45 is affirmative.
  • step S45 When it is determined that the accessed variable is a shared variable (step S45; Yes), the correction unit 132 replaces the selected location of use with the variable access of the object-oriented FB instance (step S46). As a result, description 4181 in FIG. 9 is replaced with description 4191 in FIG.
  • step S47 determines whether or not all usage locations have been selected. If it is determined that all the usage locations have not been selected (step S47; No), the generation unit 13 returns to step S43 and executes processing for the next usage location. This selects the description 4182 shown in FIG. 9, for example.
  • step S44 determines that the operation of the programmable controller will be correct if the description of the call expression is replaced with the method. It is determined whether or not there is a change (step S48). For example, if the operation based on the description of the calling expression depends on the previous value, the operation implemented by the replacement code obtained by replacing the description with the method is different from the operation implemented by the first source code 41. do.
  • the previous value means the execution result of the previous scan by the programmable controller. Scanning corresponds to one execution of control processing defined in the operation program repeatedly executed by the programmable controller.
  • the static analysis unit 131 determines whether or not there is a common variable in the parameters specified in the description of the call expression (step S50). Specifically, the static analysis unit 131 determines whether or not a variable corresponding to the common variable is specified as an argument. If it is determined that there is a common variable in the parameter (step S50; Yes), a separate substitution equivalent to the parameter substitution is inserted (step S51) because the conventional FB variable cannot be simply replaced with the common variable. .
  • the formal argument of the detached assignment is access to the instance variable of the object-oriented FB, not to the instance variable of the conventional FB.
  • step S50 If it is determined that there is no common variable in the parameter (step S50; No), and following step S51, the correction unit 132 replaces the selected description with an object-oriented FB method (step S52). This replaces the description 4182 in FIG. 9 with the description 4194 in FIG. After that, the determination of step S47 is executed.
  • step S47 If it is determined in step S47 that all usage locations have been selected (step S47; Yes), the correction unit 132 deletes the declaration part of the selected instance (step S53). As a result, for example, the variable 412 shown in FIG. 9 is deleted, and the programming support device 10 completes the processing related to the currently selected instance of the conventional type FB, and shifts the processing to step S56.
  • step S45 If it is determined in step S45 that the accessed variable is not a common variable (step S45; No), the generation unit 13 associates the variable with the variable in the instance method of the object-oriented FB. Therefore, it is determined that the variable cannot be accessed from the outside. Then, the generation unit 13 notifies the user that the description cannot be replaced (step S54), and proceeds to step S56 without replacing the currently selected conventional type FB instance.
  • step S48 If it is determined in step S48 that the action will change (step S48; Yes), the generator 13 notifies the user that the action will change (step S55), and Without replacing the FB instance, the process proceeds to step S56.
  • step S53 is executed to complete the replacement of the instance.
  • the processing for the selected instance is terminated.
  • step S56 the generation unit 13 determines whether or not the selection in the generation process has been completed for all conventional FB instances selected in step S33 (step S56). If it is determined that the selection has not been completed (step S56; No), the generating unit 13 repeats the processes after step S41. As a result, as shown in FIG. 10, the conventional type FB 212 "A unit positioning operation start" is selected, and steps S50 to S52 are executed, so that the description 4183 in FIG. 4193.
  • step S56 if it is determined that the selection has been completed (step S56; Yes), the processing by the programming support device 10 returns from the generation processing to the support processing shown in FIG.
  • the description about the instance of the non-object-oriented conventional FB described in the first source code 41 is replaced with the description about the instance of the object-oriented FB.
  • the second source code 42 is generated. Therefore, it is possible to reduce the burden of creating an operation program for the programmable controller and promote the transition to object-oriented programming.
  • the programming support device 10 may allocate the instance of the conventional type FB to another method by using the selection of one conventional type FB instance by the user as a trigger.
  • the programming support device 10 may analyze the first source code 41 and detect other instances having data connected to the same common variable as the instance initially selected by the user.
  • Embodiment 3 Next, the third embodiment will be described, focusing on the differences from the first and second embodiments described above.
  • the same or equivalent configurations as those of the first and second embodiments are denoted by the same reference numerals, and the explanations thereof are omitted or simplified.
  • the programming support device 10 generates the second source code 42 from the first source code 41 by combining the first and second embodiments and omitting the user operation for selecting the replacement target. This differs from the first embodiment in this point.
  • the programming support device 10 has an acquisition unit 11, a UI unit 12 and a generation unit 13 that function in the same manner as in the first embodiment.
  • Information flows similar to those in the first embodiment are indicated by bold arrows in FIG.
  • the generation unit 13 generates the related information 43, and the acquisition unit 11 acquires the related information 43. Since the related information 43 is handled as internal information of the programming support device 10, it is not necessary to make the related information 43 permanent externally.
  • the acquisition unit 11 and the generation unit 13 exhibit functions equivalent to those of the second embodiment.
  • the UI unit 12 does not include the program editor 141 and the allocation unit 142 according to the second embodiment.
  • the generation unit 13 also has an allocation unit 142a whose function is expanded from the allocation unit 142 according to the second embodiment.
  • the related information 43 and the project data 20 are provided from the acquisition unit 11 to the allocation unit 142a.
  • the allocation unit 142a extracts one or a plurality of second source codes 42 using conventional FB instances from the project data 20, and declares object-oriented FB instances for each of the extracted second source codes 42. , assigns a conventional FB instance to an object-oriented FB instance.
  • the acquisition unit 11 acquires a plurality of first source codes 41 (step S61).
  • the allocation unit 142a selects one unselected first source code 41 (step S62). Then, the allocation unit 142a determines whether or not the selected first source code 41 declares an instance of the conventional FB included in the related information 43 (step S63). That is, the allocation unit 142a determines whether or not an instance that can be replaced based on the related information 43 is declared in the first source code 41 or not. If it is determined that the instance is not declared (step S63; No), the allocation unit 142a ends the processing related to the first source code 41 and shifts the processing to step S66.
  • step S63 if it is determined that an instance has been declared (step S63; Yes), the allocation unit 142a assigns the object-oriented FB instance associated in the related information 43 to the conventional FB of the instance found in step S63. , is declared in the selected first source code 41 (step S64).
  • step S64 corresponds to the declaration of instance 417 shown in FIG.
  • the programming support device 10 declares the instance in step S64.
  • the allocation unit 142a classifies multiple instances of the conventional FB declared in the first source code 41 into groups, and declares an instance of the object-oriented FB corresponding to each group. Instances of conventional FBs are classified by classifying them so that multiple instances declared based on the same conventional FB do not belong to one group. That is, each time an instance declared based on the same conventional FB appears, this instance is classified into a new group.
  • the first source code 41 may be analyzed and classified so that a plurality of conventional FB instance variables belonging to one group do not correspond to common variables of different data types. By minimizing the number of groups, more conventional FB instances can be combined into one object-oriented FB instance.
  • step S65 the allocation unit 142a allocates the instance of the conventional FB classified into the group corresponding to the object-oriented FB to the instance of the object-oriented FB declared in step S64 (step S65).
  • This step S65 corresponds to the allocation of methods and instances shown in FIG. However, while the assignment is made by the user in the example of FIG. 10, it is made by the programming support device 10 in step S65.
  • step S34 the generation unit 13 executes generation processing similar to that of the second embodiment (step S34). Then, the generation unit 13 determines whether or not all the first source codes 41 have been selected (step S66), and if it is determined that all the first source codes 41 have not been selected (step S66; No), the process after step S62 is repeated. On the other hand, if it is determined that all the first source codes 41 have been selected (step S66; Yes), the support processing ends.
  • the allocation unit 142a analyzes the first source code 41 and allocates the conventional FB instance to the method of the object-oriented FB instance. This can further reduce the burden of creating an operation program.
  • the generation unit 13 having the allocation unit 142a classifies a plurality of first instances described in the first source code into groups, and assigns the description of the first instance belonging to each group to the second instance corresponding to the group. corresponds to an example of generating means for replacing the related information with a description relating to the second instance of the second function block having the method associated with the first function block of the first instance.
  • the second source codes 22 and 42 are output to the project data 20 in the storage device 200
  • the present invention is not limited to this.
  • the second source code 22 , 42 may be output as constituting new project data different from the project data 20 .
  • first source codes 21, 41 and the second source codes 22, 42 are not limited to single files, and may include multiple files. Also, a single file may be divided and handled as a plurality of first source codes 41 .
  • variable “unit information” included in each of the conventional FBs 211 and 212 is made to correspond to the common variable "unit information" of the object-oriented FB 220, and the variables included in each of the conventional FBs 211 and 212
  • the variable “error information” that is stored in the object-oriented FB 220 may be made to correspond to the common variable “error information” of the object-oriented FB 220 .
  • Such correspondence is set by the user using common variable names as shown in FIG.
  • the functions of the programming support device 10 can be realized by dedicated hardware or by a normal computer system.
  • the program P1 executed by the processor 31 is stored in a computer-readable non-temporary recording medium, distributed, and the program P1 is installed in the computer to configure the device that executes the above process.
  • Examples of such recording media include flexible discs, CD-ROMs (Compact Disc Read-Only Memory), DVDs (Digital Versatile Discs), and MOs (Magneto-Optical Discs).
  • the program P1 may be stored in a disk device of a server device on a communication network typified by the Internet, superimposed on a carrier wave, and downloaded to a computer.
  • the above processing can also be achieved by starting and executing the program P1 while transferring it via a communication network.
  • the above processing can also be achieved by executing all or part of the program P1 on the server device and executing the program while the computer transmits and receives information regarding the processing via a communication network.
  • the functions described above are to be shared by the OS (Operating System) or by cooperation between the OS and the application, only the parts other than the OS may be stored in a medium and distributed. , or you may download it to your computer.
  • means for realizing the functions of the programming support device 10 are not limited to software, and part or all of them may be realized by dedicated hardware including circuits.
  • the present disclosure is suitable for developing an operating program for operating a programmable controller.
  • 10 programming support device 11 acquisition unit, 12 UI unit, 120 screen, 121, 127 submenus, 122 input fields, 123, 128 tables, 124 check box columns, 125 columns, 126, 129 buttons, 13 generation unit, 131 static logical analysis unit, 132 correction unit, 141 program editor, 142, 142a allocation unit, 200 storage device, 20 project data, 21, 41 first source code, 211, 212, 213 conventional FB, 2111, 2112, 2121, 2122 , 411, 412, 413, 414, 415, 416 variables, 22, 42 second source code, 220 object-oriented FB, 2201 common variables, 221, 222 methods, 23 execution program, 31 processor, 32 main storage unit, 33 Auxiliary storage unit, 34 input unit, 35 output unit, 36 communication unit, 37 internal bus, 43 related information, 418, 419, 2113, 2212, 2222, 4181 to 4184, 4191 to 4194 description, 417 instance, P1 program.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

プログラムは、プログラマブルコントローラを動作させるための動作プログラムの作成を支援するプログラミング支援装置(10)を、動作プログラムの第1ソースコード(21)を取得する取得部(11)、サブルーチンであるファンクションブロックの機能が、当該ファンクションブロックに含まれる一又は複数のメソッドとは異なる形式にて第1ソースコード(21)において記述された従来型FBを、機能がメソッドとして記述されるオブジェクト指向FBに置換することで、又は、第1ソースコードのうちの、従来型FBに基づいて宣言されたインスタンスに関する記述を、オブジェクト指向FBに基づいて宣言されるインスタンスに関する記述に置換することで、動作プログラムの第2ソースコード(22)を生成する生成部(13)、として機能させる。

Description

プログラミング支援プログラム、プログラミング支援方法及びプログラミング支援装置
 本開示は、プログラミング支援プログラム、プログラミング支援方法及びプログラミング支援装置に関する。
 FAの現場で広く用いられるプログラマブルコントローラに特定の制御処理を実行させるためには、当該制御処理の内容を規定する動作プログラムを作成して当該動作プログラムをプログラマブルコントローラに実行させる必要がある。このような動作プログラムにオブジェクト指向プログラミングを導入するための技術が提案されている(例えば、特許文献1を参照)。特許文献1には、プロセス制御システムを構成する機能をオブジェクト化して、各オブジェクトがメソッドとデータをカプセル化する技術について記載されている。
 また、動作プログラムを作成するためのプログラミング言語の規格として、例えばIEC61131-3が知られている。このIEC61131-3の第3版では、オブジェクト指向プログラミングが導入されており、第2版で規定されたサブルーチンに相当する従来型ファンクションブロックから拡張されたオブジェクト指向ファンクションブロックが導入されている。
特開2005-353092号公報
 従来型ファンクションブロックの記述を含むソフトウェア資産を有するユーザに対して、オブジェクト指向プログラミングへの移行は、新たな言語仕様の習得、及び、言語仕様の差異に基づくプログラムの修正工数の発生を強いるものであり、煩雑な作業が生じる。また、このような煩雑な作業の結果として誤った動作プログラムが作成された場合には、結果的にプログラマブルコントローラが意図されていない動作をしてしまうおそれがある。したがって、プログラマブルコントローラに正確な動作をさせるために、プログラマブルコントローラの動作プログラムを作成する負担を軽減する余地があった。
 本開示は、上記実情に鑑みてなされたものであり、プログラマブルコントローラの動作プログラムを作成する負担を軽減することを目的とする。
 上記目的を達成するため、本開示のプログラミング支援プログラムは、プログラマブルコントローラを動作させるための動作プログラムの作成を支援するコンピュータを、動作プログラムの第1ソースコードを取得する取得手段、サブルーチンであるファンクションブロックの機能が、当該ファンクションブロックに含まれる一又は複数のメソッドとは異なる形式にて第1ソースコードにおいて記述された第1ファンクションブロックを、機能がメソッドとして記述される第2ファンクションブロックに置換することで、又は、第1ソースコードのうちの、第1ファンクションブロックに基づいて宣言された第1インスタンスに関する記述を、第2ファンクションブロックに基づいて宣言される第2インスタンスに関する記述に置換することで、動作プログラムの第2ソースコードを生成する生成手段、として機能させる。
 本開示によれば、プログラマブルコントローラの動作プログラムを作成する負担を軽減することができる。
実施の形態1に係るプログラミング支援装置の機能的な構成を示す図 実施の形態1に係るプログラミング支援装置のハードウェア構成を示す図 実施の形態1に係る従来型ファンクションブロックを選択するための画面の一例を示す図 実施の形態1に係る共通化変数の設定画面の一例を示す図 実施の形態1に係る第1ソースコードと第2ソースコードとを比較して示す図 実施の形態1に係る支援処理を示すフローチャート 実施の形態1に係る生成処理を示すフローチャート 実施の形態2に係るプログラミング支援装置の機能的な構成を示す図 実施の形態2に係る第1ソースコードの一例を示す図 実施の形態2に係るインスタンスを割り当てるための画面の一例を示す図 実施の形態2に係る第2ソースコードの一例を示す図 実施の形態2に係る支援処理を示すフローチャート 実施の形態2に係る生成処理を示すフローチャート 実施の形態3に係るプログラミング支援装置の機能的な構成を示す図 実施の形態3に係る支援処理を示すフローチャート 変形例に係る第1ソースコードと第2ソースコードとを比較して示す図 変形例に係る共通化変数の設定画面の一例を示す図
 以下、本開示の実施の形態に係るプログラミング支援装置について、図面を参照しつつ詳細に説明する。このプログラミング支援装置は、非オブジェクト指向のソースコードをオブジェクト指向のソースコードに変換することにより、プログラマブルコントローラの動作プログラムの作成を支援する装置である。
 実施の形態1.
 本実施の形態に係るプログラミング支援装置10は、ソースコードを編集するためのエンジニアリングツールとして機能するソフトウェアを実行可能な産業用PC(Personal Computer)又はネットワーク上のサーバ装置である。プログラミング支援装置10は、図1に示されるように、記憶装置200に格納されるプロジェクトデータ20のうちの第1ソースコード21を読み出し、読み出した第1ソースコード21に基づいて第2ソースコード22を生成して、生成した第2ソースコード22をプロジェクトデータ20内に書き込む。
 記憶装置200は、プログラミング支援装置10に脱着可能なメモリーカードであってもよいし、ネットワークを経由してプログラミング支援装置10に接続される装置であってもよい。また、図1では、記憶装置200がプログラミング支援装置10の外部に配置されているが、プログラミング支援装置10が記憶装置200を内蔵してもよい。
 プロジェクトデータ20は、プログラマブルコントローラによって用いられるデータの集合であって、プログラマブルコントローラを動作させるための動作プログラムを含む。プロジェクトデータ20に含まれる動作プログラムは、1つであってもよいし複数であってもよい。動作プログラムは、プログラマブルコントローラによって直接実行されるオブジェクトファイルの他に、当該オブジェクトファイルを得るためにコンパイルの対象となる種々のソースコードを含む。また、動作プログラムは、プログラマブルコントローラによって最初に実行される単一のプログラムの他に、適宜参照される外部プログラム及びライブラリデータを含む。
 プロジェクトデータ20は、動作プログラムとして、第1ソースコード21、第2ソースコード22、及び、実行プログラム23を含む。第1ソースコード21及び実行プログラム23は、エンジニアリングツールを用いてユーザによって作成される。
 第1ソースコード21は、非オブジェクト指向のサブルーチンに相当するファンクションブロックの定義が記述されたデータである。ファンクションブロックは、他のプログラムから呼び出されることにより予め規定された機能を発揮するための再利用可能な一又は複数の命令である。第1ソースコード21において定義されるファンクションブロックは、IEC61131-3第2版で規定されたファンクションブロックであってもよいし、IEC61131-3規格で規定されたファンクションであってもよいし、サブルーチンに相当する他のプログラミング言語要素であってもよい。以下では、ファンクションブロックを適宜FBと表記し、IEC61131-3規格をIEC規格と略記することがある。また、非オブジェクト指向のFBを従来型FBと適宜表記する。第1ソースコード21に含まれるFBは、従来型FBである。
 第2ソースコード22は、オブジェクト指向のFBの定義が記述されたデータである。詳細には、第2ソースコード22には、メソッドを有するオブジェクト指向FBの定義が記述される。メソッドは、他のプログラムから呼び出されることにより予め機能を発揮するための再利用可能な一又は複数の命令である点では従来型FBと類似するが、宣言されたオブジェクト指向FBのインスタンスのメンバ関数として呼び出される点で、従来型FBとは異なる。従来型FBが、1つのまとまった機能に対応する一方で、オブジェクト指向FBは、機能に相当するメソッドを複数含み得る。第2ソースコード22において定義されるオブジェクト指向FBは、IEC規格の第3版で規定されたものであってもよいし、同第3版で規定されたクラスであってもよいし、メソッドを有する他のプログラミング言語要素であってもよい。
 従来型FBは、サブルーチンであるファンクションブロックの機能が、当該ファンクションブロックに含まれる一又は複数のメソッドとは異なる形式で記述される第1ファンクションブロックの一例に相当する。また、オブジェクト指向FBは、その機能がメソッドとして記述される第2ファンクションブロックの一例に相当する。
 実行プログラム23は、第1ソースコード21にて定義された従来型FBのインスタンスを使用する動作プログラムである。第1ソースコード21、第2ソースコード22及び実行プログラム23を記述するプログラミング言語として、IEC規格で規定されたインストラクションリスト、ストラクチャードテキスト、ラダーダイアグラム、ファンクションブロックダイアグラム、及びシーケンシャルファンクションチャートのいずれを採用してもよいし、他の言語を採用してもよい。
 プログラミング支援装置10は、第1ソースコード21から第2ソースコード22を生成するエンジニアリングツールを実行するコンピュータとして構成される。詳細には、プログラミング支援装置10は、ハードウェア構成として、図2に示されるように、プロセッサ31と、主記憶部32と、補助記憶部33と、入力部34と、出力部35と、通信部36と、を有する。主記憶部32、補助記憶部33、入力部34、出力部35及び通信部36はいずれも、内部バス37を介してプロセッサ31に接続される。
 プロセッサ31は、処理回路としてのCPU(Central Processing Unit)を含む。プロセッサ31は、補助記憶部33に記憶されるプログラムP1を実行することにより、プログラミング支援装置10の種々の機能を実現して、後述の処理を実行する。
 主記憶部32は、RAM(Random Access Memory)を含む。主記憶部32には、補助記憶部33からプログラムP1がロードされる。そして、主記憶部32は、プロセッサ31の作業領域として用いられる。プログラムP1は、エンジニアリングツールに相当し、第2ソースコード22を生成するプログラミング支援プログラムの一例に相当する。なお、図2では1つのプログラムP1が代表的に示されているが、複数のプログラムP1があってもよい。
 補助記憶部33は、EEPROM(Electrically Erasable Programmable Read-Only Memory)及びHDD(Hard Disk Drive)に代表される不揮発性メモリを含む。補助記憶部33は、プログラムP1の他に、プロセッサ31の処理に用いられる種々のデータを記憶する。補助記憶部33は、プロセッサ31の指示に従って、プロセッサ31によって利用されるデータをプロセッサ31に供給し、プロセッサ31から供給されたデータを記憶する。
 入力部34は、キーボード及びポインティングデバイスに代表される入力デバイスを含む。入力部34は、プログラミング支援装置10のユーザによって入力された情報を取得して、取得した情報をプロセッサ31に通知する。
 出力部35は、LCD(Liquid Crystal Display)及びスピーカに代表される出力デバイスを含む。出力部35は、プロセッサ31の指示に従って、種々の情報をユーザに提示する。
 通信部36は、外部の装置と通信するためのネットワークインタフェース回路を有する。通信部36は、外部から信号を受信して、この信号により示される情報をプロセッサ31へ出力する。また、通信部36は、プロセッサ31から出力された情報を示す信号を外部の装置へ送信する。
 なお、入力部34及び出力部35は、プログラミング支援装置10のUI(User Interface)に相当する。ただし、プログラミング支援装置10は、通信部36を介して外部のUI装置と接続されて、通信部36を介して、ユーザからの情報を取得するとともにユーザに情報を提供してもよい。入力部34及び出力部35に代えて外部のUI装置と協働する通信部36がプログラミング支援装置10のUIとして用いられる場合には、入力部34及び出力部35が省略されてもよい。また、プログラミング支援装置10が外部の装置と通信することのないスタンドアロン装置である場合には、通信部36が省略されてもよい。
 図1に戻り、プログラミング支援装置10は、上述のハードウェア構成が協働することで実現される機能的な構成を有する。詳細には、プログラミング支援装置10は、第1ソースコード21を取得する取得部11と、UI部12と、ユーザからの入力に基づいて第2ソースコード22を生成する生成部13と、
を有する。
 取得部11は、主としてプロセッサ31によって実現される。なお、取得部11が記憶装置200との通信により第1ソースコード21を取得する場合には、取得部11は、プロセッサ31及び通信部36の協働により実現される。取得部11は、ユーザから指定された記憶装置200のアドレスからプロジェクトデータ20を読み出して第1ソースコード21を取得する。また、取得部11は、読み出したプロジェクトデータ20をUI部12に出力し、第1ソースコード21を生成部13に出力する。取得部11は、プログラミング支援装置10において、動作プログラムの第1ソースコードを取得する取得手段の一例に相当する。
 UI部12は、主として入力部34及び出力部35の協働により実現されてもよいし、上述のように外部のUI装置と協働する通信部36によって実現されてもよい。UI部12は、プロジェクトデータ20の構成を表示して、オブジェクト指向FBのメソッドに置換すべき従来型FBの選択をユーザから受け付ける。
 図3の例では、UI部12の画面120に、「プロジェクトA」を構成するファンクションブロックの一覧として、「位置決めデータ設定」という従来型FB211、「位置決め運転始動」という従来型FB212、及び、「温度調整開始」という従来型FB213が表示されている。この一覧から、1つ以上の従来型FBが選択され得る。図3では、ユーザによって選択された従来型FB211,211にハッチングが付されている。
 UI部12は、従来型FB211,212が選択されると、選択された従来型FB211,212に関する操作のリストを含むサブメニュー121を表示する。このサブメニュー121において「オブジェクト指向拡張」という操作が選択されると、UI部12は、オブジェクト指向FBに変換すべき対象としての従来型FB211,212の選択を受け付ける。UI部12は、プログラミング支援装置10において、第1ソースコードに含まれるファンクションブロックから第1ファンクションブロックの選択を受け付ける受付手段の一例に相当する。
 そして、UI部12は、選択された従来型FBの変数のうちの、オブジェクト指向FBのメンバ変数として共通化すべき変数の選択を受け付ける。図4の例では、画面120に、新たに作成されるオブジェクト指向FBの名称を入力するための入力欄122と、従来型FBに含まれる変数を示すテーブル123と、が表示される。ここで、従来型FB211は、図5の左側に示されるように、「ユニット情報」という変数2111及び「データNo」という変数2112それぞれの宣言を含み、従来型FB212は、「ユニット情報」という変数2121及び「始動No」という変数2122それぞれの宣言を含む。
 図4のテーブル123は、これらの変数2111,2112,2121,2122を一覧表示する。このテーブル123は、共通化すべき変数を選択するためのチェックボックス列124を含む。ユーザによってチェックボックスにチェックが付されることで選択された変数については、オブジェクト指向FBにおいて共通化される変数の名称が、列125においてユーザにより設定される。図4の例では、従来型FB211,212それぞれの「ユニット情報」という変数2111,2121が、実質的に同一の変数であるため、新たに作成される「位置決めユニット」という名称のオブジェクト指向FBにおいて「ユニット情報」という変数に統合されることが示されている。なお、「データNo」という変数2112と「始動No」という変数2122については、従来型FB211,212それぞれに固有の異なる情報であるため、共通化の設定はなされない。ユーザがボタン126を押下することで、従来型FBの選択及び共通化すべき変数の設定が完了する。
 図1に戻り、生成部13は、主としてプロセッサ31によって実現される。生成部13は、UI部12を用いてユーザにより設定された内容に基づいて、第1ソースコード21から第2ソースコード22を生成する。
 詳細には、図5の右側に示されるように、新たに作成されるオブジェクト指向FB220は、従来型FB211に対応するメソッド221と、従来型FB212に対応するメソッド222と、を有する。メソッド221の機能を特定するロジック記述2212は、対応する従来型FB211のロジック記述2113と同等の内容を有する。メソッド222の機能を特定するロジック記述2222は、対応する従来型FB212のロジック記述2123と同等の内容を有する。
 また、オブジェクト指向FB220は、従来型FB211,212の変数2111,2121が統合された共通化変数2201の宣言を含む。メソッド221は、対応する従来型FB211の変数2111,2112のうちの、共通化変数の設定から除外された変数2112に対応する変数2211の宣言を含む。メソッド222は、対応する従来型FB212の変数2121,2122のうちの、共通化変数の設定から除外された変数2122に対応する変数2221の宣言を含む。
 そして、生成部13は、生成した第2ソースコード22を記憶装置200に出力する。生成部13は、プログラミング支援装置10において、第1ソースコードにおいて記述された第1ファンクションブロックを第2ファンクションブロックに置換することで、プログラマブルコントローラを動作させるための動作プログラムの第2ソースコードを生成する生成手段の一例に相当する。
 続いて、プログラミング支援装置10によって実行される支援処理について、図6,7を用いて説明する。この支援処理は、ユーザによる特定の操作により開始する。支援処理は、動作プログラムの作成を支援するプログラミング支援方法の一例に相当する。
 支援処理において、プログラミング支援装置10の取得部11は、図6に示されるように、第1ソースコード21を取得する(ステップS1)。そして、UI部12は、ステップS1で取得された第1ソースコード21のうちの従来型FBの選択を受け付けて(ステップS2)、ステップS2で選択された従来型FBの変数のうちの共通化すべき変数の選択を受け付ける(ステップS3)。
 次に、生成部13が、ステップS1で取得された第1ソースコード21から、ステップS2,S3で受け付けられた選択に基づいて第2ソースコード22を生成する生成処理を実行する(ステップS4)。生成処理が完了すると、生成部13は、生成した第2ソースコード22を出力する(ステップS5)。その後、支援処理が終了する。
 図7には、ステップS4の生成処理の詳細が示されている。図7に示されるように、生成処理では、生成部13が、空のオブジェクト指向FBを生成し(ステップS11)、生成したオブジェクト指向FBに、ステップS3で設定された共通化変数を登録する(ステップS12)。これにより、図5の例では、共通化変数2201を宣言する記述がオブジェクト指向FBに追加される。
 次に、生成部13は、ステップS2で選択された従来型FBから、生成処理において未選択の従来型FBを1つ選択する(ステップS13)。例えば、生成部13は、図5に示される従来型FB211を選択する。
 次に、生成部13は、空のメソッドを生成し(ステップS14)、ステップS13で選択した従来型FBのロジック記述を、ステップS14で生成したメソッドのロジック記述として挿入する(ステップS15)。これにより、図5の例では、メソッド221のロジック記述2212が追加される。
 次に、生成部13は、ステップS13で選択した従来型FBに含まれる変数から、生成処理において未選択の変数を1つ選択する(ステップS16)。例えば、生成部13は、図5に示される従来型FB211の変数2111を選択する。
 生成部13は、ステップS16で選択した変数が、ステップS3にて設定された共通化変数に対応するか否かを判定する(ステップS17)。選択した変数が共通化変数に対応すると判定した場合(ステップS17;Yes)、生成部13は、ステップS16で選択した変数の名前と共通化変数の名前が同一であるか否かを判定する(ステップS18)。
 名前が同一であると判定した場合(ステップS18;Yes)、生成部13は、ステップS20に処理を移行する。一方、名前が同一でないと判定した場合(ステップS18;No)、生成部13は、メソッドのロジック記述に表れる、ステップS16で選択した変数の名前を、対応する共通化変数の名前に置換する(ステップS19)。これにより、ステップS15で挿入された変数に関する記述が、共通化変数に関する記述に修正される。変数に関する記述は、変数にアクセスするための記述であってもよいし、変数を用いた他の記述であってもよい。
 次に、生成部13は、ステップS13で選択された従来型FBのすべての変数の選択が完了したか否かを判定する(ステップS20)。すべての変数の選択が完了していないと判定した場合(ステップS20;No)、生成部13は、ステップS16以降の処理を繰り返す。これにより、例えば、図5に示される従来型FB211の変数2112が選択されて、変数2112についてステップS16以降の処理が実行される。
 ステップS17において変数が共通化変数に対応していないと判定した場合(ステップS17;No)、生成部13は、ステップS14で生成したメソッドに、ステップS16で選択した変数を登録する(ステップS21)。これにより、例えば図5に示されるメソッド221に変数2211に関する記述が追加される。
 ステップS20においてすべての変数の選択が完了したと判定した場合(ステップS20;Yes)、生成部13は、オブジェクト指向FBに、ステップS14~S20で生成されたメソッドを追加する(ステップS22)。これにより、例えば図5に示されるメソッド221がオブジェクト指向FB220に追加される。
 次に、生成部13は、ステップS2で選択されたすべての従来型FBを生成処理において選択したか否かを判定する(ステップS23)。すべての従来型FBを選択してはいないと判定した場合(ステップS23;No)、生成部13は、ステップS13以降の処理を繰り返す。これにより、例えば図5に示されるメソッド222がオブジェクト指向FB220に追加される。一方、すべての従来型FBを選択したと判定された場合(ステップS23;Yes)、オブジェクト指向FB220を規定する第2ソースコード22が生成され、プログラミング支援装置10による処理は、生成処理から図6に示される支援処理に戻る。
 以上、説明したように、本実施の形態に係るプログラミング支援装置10によれば、第1ソースコード21に記述される非オブジェクト指向の従来型FBを、オブジェクト指向FBのメソッドに置換することで、当該オブジェクト指向FBが記述された第2ソースコード22を得ることができる。このため、プログラマブルコントローラの動作プログラムを作成する負担を軽減し、オブジェクト指向プログラミングへの移行を促進することができる。
 また、プログラマブルコントローラは通常、複数のユニットを含む。従来型FBを用いてこのようなユニットの機能を提供する場合には、1つのユニットを使用する場合であっても、実行プログラム23において当該ユニットの機能毎に異なるインスタンスの宣言を記述して、ユニットに関する同様の情報を設定する必要があり、実行プログラム23が複雑になってしまう。
 これに対して、本実施の形態に係るプログラミング支援装置10によって複数の従来型FBを1つのオブジェクト指向FBが有する複数の機能に置き換えれば、実行プログラム23においてメソッドを呼び出す度に共通のデータを設定する必要はなく、第1ソースコード41を簡略化することができる。
 UI部12は、選択要素として第1ソースコードに含まれる複数の第1ファンクションブロックの選択を受け付ける受付手段の一例に相当し、生成部13は、第1ソースコードから選択された複数の第1ファンクションブロックを、第1ファンクションブロックそれぞれに対応するメソッドを複数含む一の第2ファンクションブロックに置換することで、第2ソースコードを生成する生成手段の一例に相当する。また、生成部13は、複数の第1ファンクションブロックを、第1ファンクションブロックにそれぞれ含まれる異なる変数に対応する共通化変数を含む第2ファンクションブロックに置換する生成手段の一例に相当する。
 なお、図4に示されるように、生成されるオブジェクト指向FBの名前、及び、共通化変数の名前をユーザが手動で設定する例について説明したが、これには限定されない。オブジェクト指向FBの名前及び共通化変数の名前を、予め定められた命名規則に従ってプログラミング支援装置10が設定してもよい。
 また、オブジェクト指向FBのメソッドの名前が、従来型FBの名前に類似するものとしてプログラミング支援装置10によって設定される例について説明したが、これらの名前は同一であってもよいし、ユーザによってメソッドの名前が設定されてもよい。
 また、共通化変数に対応させる従来型FBの変数をユーザがUI部12を用いて設定する例について説明したが、これには限定されない。例えば、UI部12に代えて生成部13が、実行プログラム23を解析して、同じデータが接続されている従来型FBの入力変数又は出力変数を共通化変数に設定してもよい。共通化変数の選択、及び、オブジェクト指向FBの名前の設定が、ユーザではなくプログラミング支援装置10によってなされる場合には、図4に示されるダイアログ画面の表示が省略される。
 実施の形態2.
 続いて、実施の形態2について、上述の実施の形態1との相違点を中心に説明する。なお、上記実施の形態1と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。本実施の形態は、FBを定義する記述の置換に代えて、FBに基づいて宣言されたインスタンスに関する記述を置換する点で、上記実施の形態1とは異なる。
 本実施の形態に係るプログラミング支援装置10は、図8に示されるように、記憶装置200に格納されたプロジェクトデータ20に含まれる非オブジェクト指向の第1ソースコード41を読み出して、読み出した第1ソースコード41からオブジェクト指向の第2ソースコード42を生成して出力する。
 第1ソースコード41及び第2ソースコード42はいずれも、実施の形態1に係る実行プログラム23に相当する。第1ソースコード41は、従来型FBのインスタンスに関する記述を含む。インスタンスに関する記述は、インスタンスの宣言であってもよいし、インスタンスの変数又はロジック記述にアクセスするための記述であってもよい。第2ソースコード42は、第1ソースコード41の従来型FBのインスタンスに関する記述が、オブジェクト指向FBのインスタンスに関する記述に置き換えられたものに相当する。
 プロジェクトデータ20は、関連情報43を含む。関連情報43は、インスタンスに関する記述を置き換えるための従来型FBとオブジェクト指向FBとの対応関係を示す情報である。詳細には、関連情報43は、従来型FBとオブジェクト指向FBのメソッドとの対応関係、及び、従来型FBの変数とオブジェクト指向FBの共通化変数との対応関係を示す。例えば、関連情報43は、図5に示されるように、従来型FB211とメソッド221とを関連付けて示し、従来型FB212とメソッド222とを関連付けて示し、変数2111,2121と共通化変数2201とを関連付けて示す。
 関連情報43は、実施の形態1に係る生成部13によって生成されてもよいし、プログラミング支援装置10が生成することなく外部から提供されてもよい。図8では、関連情報43を予め含むプロジェクトデータ20が例示されているが、関連情報43をプログラミング支援装置10に提供する手法は任意である。例えば、関連情報43が同梱されたFBライブラリがプロジェクトデータ20にインポートされてもよいし、プログラマブルコントローラを含むFA機器の製造メーカーから提供されるFBに関連情報43が同梱されてもよい。関連情報43は、第1ファンクションブロックとしての従来型FBに含まれる変数と、第2ファンクションブロックとしてのオブジェクト指向FBに含まれる変数と、を関連付ける情報の一例に相当する。
 プログラミング支援装置10の取得部11は、第1ソースコード41及び関連情報43を取得して、UI部12に提供する。取得部11は、プログラミング支援装置10において、第1ファンクションブロックの機能と、該機能をメソッドとして含む第2ファンクションブロックと、が関連付けられた関連情報を取得する取得手段の一例に相当する。
 UI部12は、第1ソースコード41を編集するためのプログラムエディタ141と、置換すべきインスタンスを割り当てる割当部142と、
を有する。
 プログラムエディタ141は、取得部11によって取得された第1ソースコード41に記述されるオブジェクト指向FBのインスタンスの指定を受け付ける。例えば、プログラムエディタ141は、図9に示されるように、第1ソースコード41の内容を画面120に表示する。この第1ソースコード41は、従来型FB211,212に実質的に共通する変数411,414と、従来型FB211のインスタンスに相当する変数412,415と、従来型FB212のインスタンスに相当する変数413,416と、
の記述を含む。変数411~413は、「Aユニット」に関する変数であって、変数414~416は、「Bユニット」に関する変数である。
 また、図9の例において第1ソースコード41は、オブジェクト指向FB220のインスタンス417を宣言する記述を含む。このインスタンス417に関する記述は、第1ソースコード41が取得部11によって取得された後にプログラムエディタ141を操作するユーザによって追加される。ただし、記憶装置200に格納されている第1ソースコード41がインスタンス417の記述を予め含んでもよい。インスタンス417の記述が予め含まれる場合には、プログラムエディタ141を省略してUI部12を構成してもよい。図9の例では、ロジック記述418は、IEC規格で規定されるストラクチャードテキストの形式で記述されているが、他の形式で記述されてもよい。
 ユーザが第1ソースコード41においてインスタンス417を選択すると、プログラムエディタ141は、当該インスタンス417に関する操作のリストを含むサブメニュー127を表示する。サブメニュー127のリストから「このインスタンスに置き換え」が指定されると、プログラムエディタ141は、従来型FBのインスタンスの置換先となるオブジェクト指向FBのインスタンス417の指定を受け付けて、指定されたインスタンスを割当部142に通知する。
 割当部142は、オブジェクト指向FBの指定されたインスタンスのメソッドに対する従来型FBのインスタンスの割り当てを受け付ける。詳細には、割当部142は、インスタンスが指定されたオブジェクト指向FBのメソッドと関連情報43において関連する従来型FBのインスタンスの選択をユーザから受け付ける。例えば、割当部142は、図10に示されるように、メソッドと、割り当てるべき従来型FBのインスタンスの選択欄と、を関連付けるテーブル128を画面120に表示する。ユーザは、このテーブル128を用いて、指定したオブジェクト指向FBのインスタンスのメソッドを、従来型FBのインスタンスに割り当てる。割り当て候補として表示される従来型FBのインスタンスの選択肢は、第1ソースコード41のスコープの範囲内にあり、かつ、関連情報43においてメソッドに関連付けられた従来型FBをデータ型とする変数である。
 例えば、図9に示されるように「位置決めユニット」が置換先のオブジェクト指向FBのインスタンスとして指定された場合において、テーブル128に含まれるメソッドは、図5に示されるオブジェクト指向FB220のメソッド221,222となる。また、テーブル128に含まれるインスタンスは、図5に示されるようにメソッド221,222に対応する従来型FB211,212のインスタンスとして、第1ソースコード41に記述されたものである。上述したように、図9の例では、従来型FB211の「Aユニット」及び「Bユニット」それぞれに関するインスタンスが変数412,415として宣言され,従来型FB212の「Aユニット」及び「Bユニット」それぞれに関するインスタンスが変数413,416として宣言されている。図10の例では、「運転始動メソッド」に割り当てるべき従来型FB212のインスタンスとして、変数413に相当する「Aユニット位置決め運転始動」というインスタンス及び変数416に相当する「Bユニット位置決め運転始動」というインスタンスが、割り当て候補としてコンボボックスに一覧表示されている。この一覧のうちの「Aユニット位置決め運転始動」というインスタンスが割り当て対象としてユーザにより選択されていることがハッチングで示されている。また、「データ設定メソッド」には、「Aユニット位置決めデータ設定」を割り当てることが示されている。ユーザがボタン129を押下することで、テーブル128を用いて設定された内容が生成部13に通知される。
 プログラムエディタ141及び割当部142を含むUI部12は、プログラミング支援装置10において、第1ソースコードに記述された第2インスタンスの指定を受け付けて、指定された第2インスタンスのメソッドと関連情報において関連付けられた機能を有する従来型FBのインスタンスの選択を受け付ける受付手段の一例に相当する。
 生成部13は、第1ソースコード41を静的に解析する静的解析部131と、第1ソースコード41に記述された従来型FBのインスタンスに関する記述をオブジェクト指向FBのインスタンスに関する記述に修正する修正部132と、
を有する。
 静的解析部131は、割当部142によって割り当てられた従来型FBのインスタンスをオブジェクト指向FBのメソッドに置換することが可能か否かを判断する。また、静的解析部131は、第1ソースコード41に記述された従来型FBのインスタンスをオブジェクト指向FBのメソッドに置換することで得る置換コードに基づくプログラマブルコントローラの動作が、第1ソースコード41に基づくプログラマブルコントローラの動作から変化するか否かを判断する。置換可能であり、かつ、動作に変化がない場合には、静的解析部131は、修正部132に対して第1ソースコード41の修正を許可して、修正部132に第2ソースコード42を生成させる。
 置換不可である場合には、静的解析部131は、置換不可の旨をユーザに報知し、動作が変化する場合には、動作が変化する旨をユーザに報知する。ユーザへの報知は、UI部12を介してなされてもよいし、他の手法によりなされてもよい。静的解析部131を有する生成部13は、第1ソースコードにおける第1ファンクションブロックの機能を呼び出すための記述が、第2ファンクションブロックのメソッドを呼び出すための記述に置換された置換コードに従うプログラマブルコントローラの動作が、第1ソースコードに従うプログラマブルコントローラの動作と異なる場合に、置換により動作が変化する旨を報知する生成手段の一例に相当する。また、生成部13は、第1ソースコードにおける第1インスタンスの第1ファンクションブロックに含まれる変数が、第2ファンクションブロックに含まれるメソッドの変数と関連情報において関連付けられる場合に、変数が置換されない旨を報知する生成手段の一例に相当する。
 修正部132は、第1ソースコード41における従来型FBのインスタンスに関する記述を、オブジェクト指向FBのインスタンスに関する記述に修正する。従来型FBのインスタンスは、従来型FBの機能を示すロジック記述の呼び出し、又は、従来型FBの変数へのアクセスとして用いられる。修正部132は、従来型FBのロジック記述を呼び出す記述を、オブジェクト指向FBのメソッドを呼び出す記述に置換する。また、修正部132は、従来型FBの変数にアクセスするための記述を、オブジェクト指向FBの変数にアクセスするための記述に置換する。修正部132は、置換に成功した従来型FBのインスタンスを宣言する記述を第1ソースコード41から削除する。
 修正部132を有する生成部13は、第1ソースコードにおける第1ファンクションブロックの機能を呼び出すための記述を、第2ファンクションブロックのメソッドを呼び出すための記述に置換する生成手段の一例に相当する。また、生成部13は、第1ソースコードにおける第1ファンクションブロックに含まれる変数の記述を、第2ファンクションブロックに含まれる変数の記述に置換する生成手段の一例に相当する。
 図11には、図9に示される第1ソースコード41が修正部132によって修正されることで生成された第2ソースコード42が例示されている。図11に示されるように、第2ソースコード42では、「Aユニット」に関する従来型FBのインスタンスに相当する変数412,413の宣言部分が削除されている。また、ロジック記述418がロジック記述419に修正されている。
 なお、ロジック記述を呼び出すときに指定されるパラメータが共通化変数である場合において、当該パラメータは、対応するメソッドを呼び出すときに指定される一又は複数のパラメータから削除されるため、修正部132は、分離代入の記述を挿入する。図11の例では、ロジック記述418に含まれる「Aユニット位置決め運転始動(ユニット情報:=Aユニット情報,始動No:=1)」という記述4183が、「Aユニット.運転始動メソッド(始動No:=1);」という記述4193に修正されるとともに、「Aユニット.ユニット情報:=Aユニット情報;」という分離代入の記述4192が挿入されている。分離代入の結果、実質的に同一の記述4191,4192が生成されているが、修正部132は、最適化処理を実行して、このような冗長な記述を簡略化してもよい。
 続いて、本実施の形態に係るプログラミング支援装置10によって実行される支援処理について、図12,13を用いて説明する。支援処理では、図12に示されるように、取得部11が、第1ソースコード41を取得する(ステップS31)。そして、UI部12のプログラムエディタ141が、置換先となるオブジェクト指向FBのインスタンスの指定を受け付けて(ステップS32)、割当部142が、置換対象となる従来型FBのインスタンスの選択を受け付ける(ステップS33)。
 次に、生成部13が、ステップS32,S33で受け付けた内容に基づいて、ステップS31で取得された第1ソースコード41から第2ソースコード42を生成する生成処理を実行する(ステップS34)。そして、生成部13は、生成した第2ソースコード42を出力し、支援処理が終了する。
 図13には、ステップS34で実行される生成処理の詳細が示されている。図13に示されるように、生成処理では、生成部13が、ステップS33で割り当てられた従来型FBのインスタンスのうちの生成処理において未選択の1つを選択する(ステップS41)。例えば、図10に示される「Aユニット位置決めデータ設定」が選択される。
 次に、生成部13は、ステップS41で選択したインスタンスの使用箇所を第1ソースコード41からすべて検索する(ステップS42)。これにより、図9の例では、「Aユニット位置決めデータ設定」が使用されている記述4181,4182がヒットする。なお、従来型FBのインスタンスに相当する変数412を宣言する記述は、検索対象から除外される。
 次に、生成部13の静的解析部131は、検索によりヒットした使用箇所のうちの、生成処理において未選択の使用箇所を1つ選択する(ステップS43)。そして、静的解析部131は、ステップS43で選択した使用箇所が、呼び出し式の記述であるか否かを判定する(ステップS44)。具体的には、この使用箇所が、従来型FBのインスタンスのロジック記述を呼び出すものであるか否かが判定される。ステップS43で選択された使用箇所が、図9の記述4181であるときには、当該記述418が呼び出し式ではなくインスタンス変数にアクセスするものであるため、ステップS44の判定は否定される。
 選択した使用箇所が呼び出し式の記述でないと判定した場合(ステップS44;No)、静的解析部131は、この使用箇所が変数アクセスの記述であると判断して、アクセスされる変数が共通化変数であるか否かを判定する(ステップS45)。図9の記述4181については、「ユニット情報」が図5に示されるように共通化変数に対応するため、ステップS45の判定が肯定される。
 アクセスされる変数が共通化変数であると判定された場合(ステップS45;Yes)、修正部132は、選択された使用箇所を、オブジェクト指向FBのインスタンスの変数アクセスに置換する(ステップS46)。これにより、図9の記述4181が、図11の記述4191に置き換えられる。
 次に、生成部13は、すべての使用箇所を選択したか否かを判定する(ステップS47)。すべての使用箇所を選択していないと判定した場合(ステップS47;No)、生成部13は、ステップS43に戻り、次の使用箇所に関する処理を実行する。これにより、例えば図9に示される記述4182が選択される。
 ステップS44にて、選択した使用箇所が呼び出し式の記述であると判定した場合(ステップS44;Yes)、静的解析部131は、呼び出し式の記述をメソッドに置換した場合にプログラマブルコントローラの動作が変化するか否かを判定する(ステップS48)。例えば、呼び出し式の記述に基づく動作が前回値に依存する場合には、当該記述をメソッドに置換することで得る置換コードにより実現される動作が、第1ソースコード41により実現される動作から変化する。ここで、前回値は、プログラマブルコントローラによる前回のスキャンの実行結果を意味する。スキャンは、動作プログラムに規定されている制御処理がプログラマブルコントローラによって繰り返し実行されるうちの1回の実行に相当する。
 動作が変化しないと判定した場合(ステップS48;No)、静的解析部131は、呼び出し式の記述において指定されるパラメータに共通化変数があるか否かを判定する(ステップS50)。具体的には、静的解析部131は、引数として共通化変数に対応する変数が指定されているか否かを判定する。パラメータに共通化変数があると判定した場合(ステップS50;Yes)、従来型FBの変数から共通化変数への単純な置き換えができないため、パラメータ代入と等価な分離代入を挿入する(ステップS51)。ここで、分離代入の仮引数については、従来型FBのインスタンス変数に対するアクセスではなく、オブジェクト指向FBのインスタンス変数へのアクセスとする。
 パラメータに共通化変数がないと判定した場合(ステップS50;No)、及び、ステップS51に続いて、修正部132は、選択された記述を、オブジェクト指向FBのメソッドに置換する(ステップS52)。これにより、図9の記述4182が、図11の記述4194に置き換えられる。その後、ステップS47の判定が実行される。
 ステップS47にて、すべての使用箇所を選択したと判定された場合(ステップS47;Yes)、修正部132は、選択されたインスタンスの宣言部分を削除する(ステップS53)。これにより、例えば図9に示される変数412が削除されて、プログラミング支援装置10は、現在選択されている従来型FBのインスタンスに関する処理を完了して、ステップS56に処理を移行する。
 なお、ステップS45にて、アクセスされる変数が共通化変数でないと判定された場合(ステップS45;No)、生成部13は、当該変数がオブジェクト指向FBのインスタンスのメソッド内の変数に関連付けられているため、外部から当該変数にアクセスすることができないと判断する。そして、生成部13は、記述の置換が不可である旨をユーザに通知して(ステップS54)、現在選択されている従来型FBのインスタンスを置き換えることなく、ステップS56に移行する。
 また、ステップS48にて、動作が変化すると判定された場合(ステップS48;Yes)、生成部13は、動作が変化することをユーザに通知して(ステップS55)、現在選択されている従来型FBのインスタンスを置き換えることなく、ステップS56に移行する。
 これにより、ステップS41で選択されたインスタンスに関してステップS42で検索されたすべての使用箇所の修正が可能であるときには、ステップS53が実行される結果、インスタンスの置換が完了する。一方、修正が可能でない使用箇所が検出された際には、選択されたインスタンスに関する処理を終了する。
 ステップS56では、生成部13は、ステップS33で選択されたすべての従来型FBのインスタンスについて生成処理における選択が完了したか否かを判定する(ステップS56)。選択が完了していないと判定した場合(ステップS56;No)、生成部13は、ステップS41以降の処理を繰り返す。これにより、図10に示されるように「Aユニット位置決め運転始動」という従来型FB212が選択されて、ステップS50~S52が実行されることにより、図9の記述4183が、図11の記述4192,4193に置き換えられる。
 一方、選択が完了したと判定された場合(ステップS56;Yes)、プログラミング支援装置10による処理は、生成処理から、図12に示される支援処理に戻る。
 以上、説明したように、本実施の形態に係るプログラミング支援装置10によれば、第1ソースコード41に記述される非オブジェクト指向の従来型FBのインスタンスに関する記述を、オブジェクト指向FBのインスタンスに関する記述に置換することで、第2ソースコード42が生成される。このため、プログラマブルコントローラの動作プログラムを作成する負担を軽減し、オブジェクト指向プログラミングへの移行を促進することができる。
 なお、図10において、複数のインスタンスがユーザにより選択される例について説明したが、これには限定されない。例えば、1つの従来型FBのインスタンスがユーザによって選択されたことをトリガとして、プログラミング支援装置10が、他のメソッドに従来型FBのインスタンスを割り当ててもよい。プログラミング支援装置10は、第1ソースコード41を解析して、最初にユーザによって選択されたインスタンスと同一の共通化変数に接続されるデータを有する他のインスタンスを検出すればよい。
 実施の形態3.
 続いて、実施の形態3について、上述の実施の形態1,2との相違点を中心に説明する。なお、上記実施の形態1,2と同一又は同等の構成については、同等の符号を用いるとともに、その説明を省略又は簡略する。本実施の形態は、実施の形態1,2を組み合わせた上で、置換対象を選択するためのユーザ操作を省いて、プログラミング支援装置10が第1ソースコード41から第2ソースコード42を生成する点で、上記実施の形態1とは異なる。
 本実施の形態に係るプログラミング支援装置10は、図14に示されるように、実施の形態1と同様に機能する取得部11,UI部12及び生成部13を有する。実施の形態1と同様の情報の流れについては、図14において太線の矢印で示されている。
 生成部13は、関連情報43を生成して、取得部11は、関連情報43を取得する。関連情報43がプログラミング支援装置10の内部情報として扱われるため、外部において関連情報43を永続化する必要はない。取得部11及び生成部13は、実施の形態2と同等の機能を発揮する。UI部12からは、実施の形態2に係るプログラムエディタ141及び割当部142が省略されている。
 また、生成部13は、実施の形態2に係る割当部142から機能が拡張された割当部142aを有する。割当部142aには、取得部11から関連情報43及びプロジェクトデータ20が提供される。
 割当部142aは、プロジェクトデータ20から従来型FBのインスタンスを用いる一又は複数の第2ソースコード42を抽出し、抽出した第2ソースコード42それぞれに対して、オブジェクト指向FBのインスタンスを宣言して、オブジェクト指向FBのインスタンスに従来型FBのインスタンスを割り当てる。
 続いて、プログラミング支援装置10によって実行される支援処理について、割当部142aによる手順を中心に説明する。図15に示されるように、支援処理では、取得部11が、複数の第1ソースコード41を取得する(ステップS61)。
 次に、割当部142aが、未選択の第1ソースコード41を1つ選択する(ステップS62)。そして、割当部142aは、選択した第1ソースコード41において、関連情報43に含まれる従来型FBのインスタンスが宣言されているか否かを判定する(ステップS63)。すなわち、割当部142aは、関連情報43に基づく置換が可能なインスタンスが第1ソースコード41において宣言されているか否かを判定する。インスタンスが宣言されていないと判定した場合(ステップS63;No)、割当部142aは、当該第1ソースコード41に関する処理を終了して、ステップS66に処理を移行する。
 一方、インスタンスが宣言されていると判定した場合(ステップS63;Yes),割当部142aは、ステップS63にて発見されたインスタンスの従来型FBと関連情報43において関連付けられたオブジェクト指向FBのインスタンスを、選択した第1ソースコード41において宣言する(ステップS64)。このステップS64は、図9に示されたインスタンス417の宣言に対応する。ただし、図9に示されたインスタンス417の宣言は、プログラミング支援装置10の外部で付加されたのに対して、ステップS64では、プログラミング支援装置10がインスタンスを宣言する。
 具体的には、割当部142aは、第1ソースコード41において宣言された従来型FBの複数のインスタンスをグループに分類し、グループそれぞれに対応するオブジェクト指向FBのインスタンスを宣言する。従来型FBのインスタンスの分類は、同一の従来型FBに基づいて宣言される複数のインスタンスが1つのグループに属することがないように分類することでなされる。すなわち、同一の従来型FBに基づいて宣言されるインスタンスが表れるたびに、このインスタンスは新たなグループに分類される。また、第1ソースコード41を解析して、1つのグループに属する複数の従来型FBのインスタンス変数が、異なるデータ型の共通化変数と対応することがないように分類してもよい。グループの数を最小化することで、より多くの従来型FBのインスタンスを、1つのオブジェクト指向FBのインスタンスにまとめることができる。
 そして、割当部142aは、ステップS64で宣言したオブジェクト指向FBのインスタンスに、当該オブジェクト指向FBに対応するグループに分類された従来型FBのインスタンスを割り当てる(ステップS65)。このステップS65は、図10に示されたメソッドとインスタンスとの割当に対応する。ただし、図10の例では割り当てがユーザによってなされたのに対し、ステップS65では、プログラミング支援装置10によってなされる。
 次に、生成部13は、実施の形態2と同様の生成処理を実行する(ステップS34)。そして、生成部13は、すべての第1ソースコード41を選択したか否かを判定し(ステップS66)、すべての第1ソースコード41を選択してはいないと判定された場合(ステップS66;No)、ステップS62以降の処理が繰り返される。一方、すべての第1ソースコード41を選択したと判定された場合(ステップS66;Yes)、支援処理が終了する。
 以上、説明したように、割当部142aが、第1ソースコード41を解析して、オブジェクト指向FBのインスタンスのメソッドに従来型FBのインスタンスを割り当てる。これにより、動作プログラムを作成する負担をさらに軽減することができる。割当部142aを有する生成部13は、第1ソースコードに記述された複数の第1インスタンスをグループに分類し、グループそれぞれに属する第1インスタンスに関する記述を、該グループに対応する第2インスタンスであって、関連情報において第1インスタンスの第1ファンクションブロックに関連付けられたメソッドを有する第2ファンクションブロックの第2インスタンスに関する記述に置換する生成手段の一例に相当する。
 以上、本開示の実施の形態について説明したが、本開示は上記実施の形態によって限定されるものではない。
 例えば、第2ソースコード22,42が記憶装置200のプロジェクトデータ20に出力される例について説明したが、これには限定されない。例えば、第2ソースコード22,42は、プロジェクトデータ20とは異なる新たなプロジェクトデータを構成するものとして出力されてもよい。
 また、第1ソースコード21,41及び第2ソースコード22,42は、単一のファイルに限られず、複数のファイルを含んでもよい。また、単一のファイルを分割して、複数の第1ソースコード41として扱ってもよい。
 また、上記実施の形態では、オブジェクト指向FBに含まれる共通化変数を1つだけ設定する例について説明したが、これには限定されない。図16に例示されるように、従来型FB211,212それぞれに含まれる「ユニット情報」という変数をオブジェクト指向FB220の「ユニット情報」という共通化変数に対応させるとともに、従来型FB211,212それぞれに含まれる「エラー情報」という変数をオブジェクト指向FB220の「エラー情報」という共通化変数に対応させてもよい。このような対応関係は、図17に示されるようにユーザにより共通化変数名を用いて設定される。
 また、プログラミング支援装置10の機能は、専用のハードウェアによっても、また、通常のコンピュータシステムによっても実現することができる。
 例えば、プロセッサ31によって実行されるプログラムP1を、コンピュータ読み取り可能な非一時的な記録媒体に格納して配布し、そのプログラムP1をコンピュータにインストールすることにより、上述の処理を実行する装置を構成することができる。このような記録媒体としては、例えばフレキシブルディスク、CD-ROM(Compact Disc Read-Only Memory)、DVD(Digital Versatile Disc)、MO(Magneto-Optical Disc)が考えられる。
 また、プログラムP1をインターネットに代表される通信ネットワーク上のサーバ装置が有するディスク装置に格納しておき、例えば、搬送波に重畳させて、コンピュータにダウンロードするようにしてもよい。
 また、通信ネットワークを介してプログラムP1を転送しながら起動実行することによっても、上述の処理を達成することができる。
 さらに、プログラムP1の全部又は一部をサーバ装置上で実行させ、その処理に関する情報をコンピュータが通信ネットワークを介して送受信しながらプログラムを実行することによっても、上述の処理を達成することができる。
 なお、上述の機能を、OS(Operating System)が分担して実現する場合又はOSとアプリケーションとの協働により実現する場合には、OS以外の部分のみを媒体に格納して配布してもよく、また、コンピュータにダウンロードしてもよい。
 また、プログラミング支援装置10の機能を実現する手段は、ソフトウェアに限られず、その一部又は全部を、回路を含む専用のハードウェアによって実現してもよい。
 本開示は、本開示の広義の精神と範囲を逸脱することなく、様々な実施の形態及び変形が可能とされるものである。また、上述した実施の形態は、本開示を説明するためのものであり、本開示の範囲を限定するものではない。つまり、本開示の範囲は、実施の形態ではなく、請求の範囲によって示される。そして、請求の範囲内及びそれと同等の開示の意義の範囲内で施される様々な変形が、本開示の範囲内とみなされる。
 本開示は、プログラマブルコントローラを動作させるための動作プログラムの開発に適している。
 10 プログラミング支援装置、 11 取得部、 12 UI部、 120 画面、 121,127 サブメニュー、 122 入力欄、 123,128 テーブル、 124 チェックボックス列、 125 列、 126,129 ボタン、 13 生成部、 131 静的解析部、 132 修正部、 141 プログラムエディタ、 142,142a 割当部、 200 記憶装置、 20 プロジェクトデータ、 21,41 第1ソースコード、 211,212,213 従来型FB、 2111,2112,2121,2122,411,412,413,414,415,416 変数、 22,42 第2ソースコード、 220 オブジェクト指向FB、 2201 共通化変数、 221,222 メソッド、 23 実行プログラム、 31 プロセッサ、 32 主記憶部、 33 補助記憶部、 34 入力部、 35 出力部、 36 通信部、 37 内部バス、 43 関連情報、 418,419,2113,2212,2222,4181~4184,4191~4194 記述、 417 インスタンス、 P1 プログラム。

Claims (11)

  1.  プログラマブルコントローラを動作させるための動作プログラムの作成を支援するコンピュータを、
     前記動作プログラムの第1ソースコードを取得する取得手段、
     サブルーチンであるファンクションブロックの機能が、当該ファンクションブロックに含まれる一又は複数のメソッドとは異なる形式にて前記第1ソースコードにおいて記述された第1ファンクションブロックを、前記機能が前記メソッドとして記述される第2ファンクションブロックに置換することで、又は、
     前記第1ソースコードのうちの、前記第1ファンクションブロックに基づいて宣言された第1インスタンスに関する記述を、前記第2ファンクションブロックに基づいて宣言される第2インスタンスに関する記述に置換することで、
     前記動作プログラムの第2ソースコードを生成する生成手段、
     として機能させるためのプログラミング支援プログラム。
  2.  前記コンピュータを、前記第1ソースコードを構成するファンクションブロックから前記第1ファンクションブロックの選択を受け付ける受付手段、としてさらに機能させ、
     前記生成手段は、前記第1ソースコードから選択された複数の前記第1ファンクションブロックを、前記第1ファンクションブロックそれぞれに対応するメソッドを複数含む一の前記第2ファンクションブロックに置換することで、前記第2ソースコードを生成する、
     請求項1に記載のプログラミング支援プログラム。
  3.  前記生成手段は、複数の前記第1ファンクションブロックを、前記第1ファンクションブロックにそれぞれ含まれる異なる変数に対応する共通化変数を含む前記第2ファンクションブロックに置換する、
     請求項2に記載のプログラミング支援プログラム。
  4.  前記コンピュータを、前記第1インスタンスの選択を受け付ける受付手段、としてさらに機能させ、
     前記取得手段は、前記第1ファンクションブロックの機能と、該機能をメソッドとして含む前記第2ファンクションブロックと、が関連付けられた関連情報を取得し、
     前記受付手段は、前記第1ソースコードに記述された前記第2インスタンスの指定を受け付けて、指定された前記第2インスタンスのメソッドと前記関連情報において関連付けられた機能を有する前記第1ファンクションブロックの前記第1インスタンスの選択を受け付け、
     前記生成手段は、選択された前記第1インスタンスに関する記述を、前記第2インスタンスに関する記述に置換する、
     請求項1に記載のプログラミング支援プログラム。
  5.  前記生成手段は、前記第1ソースコードにおける前記第1ファンクションブロックの機能を呼び出すための記述を、前記第2ファンクションブロックのメソッドを呼び出すための記述に置換する、
     請求項4に記載のプログラミング支援プログラム。
  6.  前記生成手段は、前記第1ソースコードにおける前記第1ファンクションブロックの機能を呼び出すための記述が、前記第2ファンクションブロックのメソッドを呼び出すための記述に置換された置換コードに従う前記プログラマブルコントローラの動作が、前記第1ソースコードに従う前記プログラマブルコントローラの動作と異なる場合に、置換により動作が変化する旨を報知する、
     請求項5に記載のプログラミング支援プログラム。
  7.  前記生成手段は、前記第1ソースコードにおける前記第1ファンクションブロックに含まれる変数の記述を、前記第2ファンクションブロックに含まれる変数の記述に置換する、
     請求項4から6のいずれか一項に記載のプログラミング支援プログラム。
  8.  前記関連情報は、前記第1ファンクションブロックに含まれる変数と、前記第2ファンクションブロックに含まれる変数と、を関連付ける情報であって、
     前記生成手段は、前記第1インスタンスの前記第1ファンクションブロックに含まれる変数が、前記第2ファンクションブロックに含まれるメソッドの変数と前記関連情報において関連付けられる場合に、変数が置換されない旨を報知する、
     請求項4から7のいずれか一項に記載のプログラミング支援プログラム。
  9.  前記取得手段は、前記第1ファンクションブロックの機能と、該機能をメソッドとして含む前記第2ファンクションブロックと、が関連付けられた関連情報を取得し、
     前記生成手段は、前記第1ソースコードに記述された複数の前記第1インスタンスをグループに分類し、グループそれぞれに属する前記第1インスタンスに関する記述を、該グループに対応する前記第2インスタンスであって、前記関連情報において前記第1インスタンスの前記第1ファンクションブロックに関連付けられたメソッドを有する前記第2ファンクションブロックの前記第2インスタンスに関する記述に置換することで、前記第2ソースコードを生成する、
     請求項1に記載のプログラミング支援プログラム。
  10.  プログラマブルコントローラを動作させるための動作プログラムの作成を支援するプログラミング支援方法であって、
     取得手段が、前記動作プログラムの第1ソースコードを取得するステップと、
     生成手段が、
     サブルーチンであるファンクションブロックの機能が、当該ファンクションブロックに含まれる一又は複数のメソッドとは異なる形式にて前記第1ソースコードにおいて記述された第1ファンクションブロックを、前記機能が前記メソッドとして記述される第2ファンクションブロックに置換することで、又は、
     前記第1ソースコードのうちの、前記第1ファンクションブロックに基づいて宣言された第1インスタンスに関する記述を、前記第2ファンクションブロックに基づいて宣言される第2インスタンスに関する記述に置換することで、
     前記動作プログラムの第2ソースコードを生成するステップと、
     を含むプログラミング支援方法。
  11.  プログラマブルコントローラを動作させるための動作プログラムの作成を支援するプログラミング支援装置であって、
     前記動作プログラムの第1ソースコードを取得する取得手段と、
     サブルーチンであるファンクションブロックの機能が、当該ファンクションブロックに含まれる一又は複数のメソッドとは異なる形式にて前記第1ソースコードにおいて記述された第1ファンクションブロックを、前記機能が前記メソッドとして記述される第2ファンクションブロックに置換することで、又は、
     前記第1ソースコードのうちの、前記第1ファンクションブロックに基づいて宣言された第1インスタンスに関する記述を、前記第2ファンクションブロックに基づいて宣言される第2インスタンスに関する記述に置換することで、
     前記動作プログラムの第2ソースコードを生成する生成手段と、
     を備えるプログラミング支援装置。
PCT/JP2022/001083 2022-01-14 2022-01-14 プログラミング支援プログラム、プログラミング支援方法及びプログラミング支援装置 WO2023135735A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2022/001083 WO2023135735A1 (ja) 2022-01-14 2022-01-14 プログラミング支援プログラム、プログラミング支援方法及びプログラミング支援装置
JP2022535791A JP7126637B1 (ja) 2022-01-14 2022-01-14 プログラミング支援プログラム、プログラミング支援方法及びプログラミング支援装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/001083 WO2023135735A1 (ja) 2022-01-14 2022-01-14 プログラミング支援プログラム、プログラミング支援方法及びプログラミング支援装置

Publications (1)

Publication Number Publication Date
WO2023135735A1 true WO2023135735A1 (ja) 2023-07-20

Family

ID=83047411

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/001083 WO2023135735A1 (ja) 2022-01-14 2022-01-14 プログラミング支援プログラム、プログラミング支援方法及びプログラミング支援装置

Country Status (2)

Country Link
JP (1) JP7126637B1 (ja)
WO (1) WO2023135735A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11237984A (ja) * 1998-02-19 1999-08-31 Nec Corp オブジェクト指向プログラム設計支援装置、方法および記録媒体
JP2014191738A (ja) * 2013-03-28 2014-10-06 Value:Kk ソースプログラムのプログラミング言語変換装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009009462A (ja) * 2007-06-29 2009-01-15 Fanuc Ltd シーケンスプログラム編集装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11237984A (ja) * 1998-02-19 1999-08-31 Nec Corp オブジェクト指向プログラム設計支援装置、方法および記録媒体
JP2014191738A (ja) * 2013-03-28 2014-10-06 Value:Kk ソースプログラムのプログラミング言語変換装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MIYAZAWA, IKO; MIZUYA, TORU: "Trends in PLC programming language standards and its future of related software technology", IEEJ STUDY GROUP MATERIALS, vol. CT-13-5, 1 March 2013 (2013-03-01), pages 19 - 24, XP009548025 *

Also Published As

Publication number Publication date
JPWO2023135735A1 (ja) 2023-07-20
JP7126637B1 (ja) 2022-08-26

Similar Documents

Publication Publication Date Title
JP7090657B2 (ja) アプリケーションをアップグレードするための方法、装置、デバイスならびに記憶媒体
US7971201B2 (en) Multiple operating device version software generating system and multiple operating device version software generation support program and method
US7627851B2 (en) Modification method for modifying a source code
US20050144608A1 (en) Operating system allowing running of real-time application programs, control method therefor, and method of loading dynamic link libraries
JP5556655B2 (ja) 解析支援プログラム,解析支援装置および解析支援方法
US20050039193A1 (en) Method and apparatus for generating device driver and user interface screen
CN116755713A (zh) 应用程序的生成方法、装置、设备及存储介质
US20030074656A1 (en) Program execution apparatus and method, computer program for performing the program execution method, image forming system, and address solution method
WO2023135735A1 (ja) プログラミング支援プログラム、プログラミング支援方法及びプログラミング支援装置
CN110806891B (zh) 嵌入式设备软件版本的生成方法及装置
JP4328328B2 (ja) ソフトウエア開発ツールプログラム
JP5720531B2 (ja) ヘルプ作成支援装置、ヘルプ作成支援プログラムおよびヘルプ作成支援方法
CN114356783A (zh) 单元测试代码自动生成方法、装置、存储介质及设备
JP6551082B2 (ja) テスト支援装置、テスト支援方法およびテスト支援プログラム
JP2016146022A (ja) モデルベース開発支援装置、モデルベース開発支援方法、およびモデルベース開発支援プログラム
JP2005025543A (ja) 整合性チェックシステム及び整合性チェック方法及び整合性チェックプログラム及び管理情報作成システム
JP2019046001A (ja) アプリケーション移植支援装置、アプリケーション移植支援プログラムおよびアプリケーション移植方法
CN114866451B (zh) iOS端路由通信改进方法、装置、存储介质和设备
JP5190899B2 (ja) 情報処理装置、設定ファイル生成方法、および設定ファイル生成プログラム
JP3996114B2 (ja) プログラムの配置方法
JPS6310239A (ja) 高級言語のパツチ生成方式
JP2023031949A (ja) 情報処理装置、プログラム及び情報処理方法
JP2669387B2 (ja) データベース駆動によるプログラム自動生成システム
JP4563551B2 (ja) プログラム編集装置及びプログラム編集方法
JP2000259399A (ja) コンピュータプログラムのソースコード構造およびそれより生成されるオブジェクトコードを制御手順として内蔵した機械装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2022535791

Country of ref document: JP

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

Ref document number: 22920260

Country of ref document: EP

Kind code of ref document: A1