Apparatus, method and program for transforming control program

The control program conversion device addresses the challenge of language incompatibilities in PLC updates by translating programming languages and addresses, enhancing efficiency in updating PLC systems.

JP2024164407AInactive Publication Date: 2024-11-27MITSUBISHI ELECTRIC CORP

Patent Information

Application Number
JP2023079858
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-05-15
Publication Date
2024-11-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing programmable logic controllers (PLCs) face challenges in program conversion due to differences in programming languages, especially with the transition to international standards like IEC61131-3, leading to inefficiencies in updating and maintaining PLC systems.

Method used

A control program conversion device that converts control programs between different PLC models by using a reference language and address range tables, along with basic function tables, to translate programming languages and device addresses, supporting multiple programming languages and design formats.

Benefits of technology

Facilitates efficient conversion of control programs across different PLC models, reducing the time and effort required for updating PLCs by automating the translation of programming languages and addresses, even when using different programming languages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024164407000001_ABST
    Figure 2024164407000001_ABST
Patent Text Reader

Abstract

To reduce the operation to change a control program even if there is a difference in programming language in updating a PLC.SOLUTION: An apparatus for transforming a control program includes a transformation processing section 13 for transforming a programming language other than a reference language Lr used in a first control program Pg1 for controlling a first PLC into a preset reference language Lr and an address of a device in the first control program Pg1 into an address of a device in a second PLC, by which transformation is done from the first control program into a second control program Pg2 for controlling the second PLC. The transformation processing section 13 comprises a reference-language transforming section 15 for transforming into a basic function described in the reference language Lr based on a basic function table 22 describing a plurality of basic functions correspondingly to a plurality of programming languages and an address transforming section 16 for transforming an address based on an address range table 21 describing a range of settable addresses.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present application relates to a control program conversion device, a control program conversion method, and a control program conversion program. [Background technology]

[0002] A programmable logic controller (PLC) is a control device developed as an alternative to relay circuits, and is currently used to control a variety of equipment and facilities. There are many manufacturers that produce PLCs, and as computer technology advances, each company is developing new models to improve their functions. Production of older models is often discontinued after a certain period of time. Even if production of a certain model is discontinued, PLCs that are still in operation are not immediately updated, and they often continue to be used until they are updated to new PLCs due to aging, breakdowns, etc., so there are a large number of PLC models in operation locally.

[0003] To operate a PLC, a PLC program, i.e., a control program, must be created, but the programming language used to create the program may differ for each model, even for PLCs manufactured by the same company. When updating a PLC, if the control program is not compatible due to differences in programming language, etc., work must be done to rewrite the control program using the updated programming language.

[0004] Patent Document 1 discloses a program conversion device that converts a control program written in a ladder language into a control program in a predetermined standard format, and converts it into a control program written in a ladder language of another manufacturer. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Japanese Patent Application Publication No. 6-187015 Summary of the Invention [Problem to be solved by the invention]

[0006] In recent years, as the international standard IEC61131-3 has stipulated standards for programming languages ​​used to create control programs, the programming tools of each company have also transitioned to ones that comply with the programming languages ​​stipulated by the international standards, and the language used may not be ladder language. The program conversion device disclosed in Patent Document 1 supports only ladder language as the programming language for the control program before and after conversion, and does not support other programming languages ​​stipulated by international standards.

[0007] The technology disclosed in this specification aims to shorten the work required to change a control program when updating a PLC, even if the programming language of the control program is different. [Means for solving the problem]

[0008] A control program conversion device as an example disclosed in the present specification converts a first control program for controlling a first programmable logic controller into a second control program for controlling a second programmable logic controller. A preset programming language used in the second control program is defined as a reference language, a device of the first programmable logic controller described in the first control program is defined as a first device, and a device corresponding to the first device in the second programmable logic controller is defined as a second device. The control program conversion device includes a control program acquisition unit for acquiring the first control program, and a conversion processing unit for converting a programming language other than the reference language used in the first control program into the reference language and converting an address of the first device in the first control program into an address of a second device in the second programmable logic controller. The conversion processing unit includes a reference language conversion unit for converting a basic function not described in the reference language in the first control program into a basic function described in the reference language based on a basic function table in which a plurality of basic functions are described corresponding to a plurality of programming languages, and an address conversion unit for converting an address of the first device in the first control program into an address of the second device in the second programmable logic controller based on an address range table in which a settable address range is described corresponding to the devices of the first programmable logic controller and the second programmable logic controller. Effect of the Invention

[0009] An example control program conversion device disclosed in the present specification converts a programming language other than the reference language used in a first control program into a predetermined reference language, and is equipped with a conversion processing unit that converts the address of a first device in the first control program into the address of a second device in a second programmable logic controller. Therefore, when updating a PLC, the work of changing the control program can be shortened even if the programming language is different. [Brief description of the drawings]

[0010] [Figure 1] 1 is a diagram showing a configuration of a control program conversion device according to a first embodiment. [Diagram 2] FIG. 2 is a diagram showing an example of an address range table in FIG. [Diagram 3] FIG. 2 is a diagram showing an example of a basic function table of FIG. [Figure 4] 2 is a diagram showing a model selection unit and a reference language selection unit in FIG. 1. [Diagram 5] 2 is a diagram showing basic function search information and basic function conversion information in FIG. 1; [Figure 6] 2 is a diagram showing first address information and second address information of FIG. 1; [Figure 7] 4 is a flowchart showing a first example of the operation of the conversion processing unit in FIG. 1; [Figure 8] FIG. 2 is a diagram showing an example of a log file in FIG. [Figure 9] 13 is a flowchart showing a second example of the operation of the conversion processing unit in FIG. [Figure 10] 2 is a diagram illustrating an example of a hardware configuration for implementing the functions of a control unit in FIG. 1; [Figure 11] FIG. 11 is a diagram showing a configuration of a control program conversion device according to a second embodiment. [Figure 12] FIG. 12 is a diagram showing an example of a design format table shown in FIG. [Figure 13] 12 is a diagram showing format search information and format conversion information of FIG. 11. [Figure 14] 12 is a flowchart showing a first example of the operation of the conversion processing unit in FIG. 11 . [Figure 15] FIG. 12 is a diagram showing an example of the log file of FIG. [Figure 16] 12 is a flowchart showing a second example of the operation of the conversion processing unit in FIG. 11 . DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] Embodiment 1 FIG. 1 is a diagram showing a configuration of a control program conversion device according to a first embodiment. FIG. 2 is a diagram showing an example of an address range table in FIG. 1, FIG. 3 is a diagram showing an example of a basic function table in FIG. 1, and FIG. 4 is a diagram showing a model selection unit and a reference language selection unit in FIG. 1. FIG. 5 is a diagram showing basic function search information and basic function conversion information in FIG. 1, and FIG. 6 is a diagram showing first address information and second address information in FIG. 1. FIG. 7 is a flowchart showing a first example of the operation of the conversion processing unit in FIG. 1, and FIG. 8 is a diagram showing an example of a log file in FIG. 1. FIG. 9 is a flowchart showing a second example of the operation of the conversion processing unit in FIG. 1, and FIG. 10 is a diagram showing an example of a hardware configuration that realizes the function of the control unit in FIG. 1. The control program conversion device 1 according to the first embodiment includes a control unit 110 and a storage unit 90, and converts a first control program Pg1 that controls a first programmable logic controller into a second control program Pg2 that controls a second programmable logic controller. An example of converting from the first control program Pg1, which is an old control program, to the second control program Pg2, which is a new control program, when updating from the first programmable logic controller to the second programmable logic controller, is described.

[0012] The control unit 110 includes a control program acquisition unit 11 that acquires a first control program Pg1 stored in the control program medium 2, a conversion processing unit 13 that converts the programming language and device addresses from the first control program Pg1 to generate a second control program Pg2, a control program output unit 19 that outputs the second control program Pg2 to the control program medium 2, a model selection unit 42, and a reference language selection unit 52. The storage unit 90 includes an address range table 21, a basic function table 22, and a log file 25. The control program conversion device 1 is connected to an input device 32 such as a keyboard and a mouse, and a display device 31 that displays input information, processing results, error information, etc. of the control program conversion device 1.

[0013] Here, the preset programming language used in the second control program Pg2 is the reference language Lr, the device of the first programmable logic controller described in the first control program Pg1 is the first device, and the device corresponding to the first device in the second programmable logic controller is the second device. The first control program Pg1 has a plurality of modules combining a plurality of basic functions, and controls the first programmable logic controller by executing the plurality of modules. The programmable logic controller is also referred to as PLC as appropriate. As described above, the PLC is a control device developed as a replacement device for the relay circuit, and therefore has a plurality of devices corresponding to the input relay, output relay, timer, counter, auxiliary relay, etc. used in the relay circuit. Taking a certain PLC model as an example, the devices corresponding to the input relay, output relay, and auxiliary relay are the input device X that holds the input data, the output device Y that holds the output data, and the storage device M that holds the internal information, respectively. The devices corresponding to the timer and counter of the relay circuit are the timer T and the counter C, respectively.

[0014] FIG. 2 shows an example of the address range table 21. In the address range table 21, the address range available for each PLC model is set. In FIG. 2, the address ranges of three models A, B, and C are shown. The row with device number 1 is the address range of the input device X. The rows with device numbers 2, 3, and 4 are the address ranges of the output device Y, timer T, and counter C, respectively. In the model C, the input device, output device, timer, and counter are coded as i, o, t, and c. The address ranges available for the input device X, output device Y, timer T, and counter C of the model A, that is, the ranges of the X address, Y address, T address, and C address, are 0 to FFF (hexadecimal), 0 to FFF (hexadecimal), 0 to 511 (decimal), and 0 to 511 (decimal), respectively. Similarly, the address ranges available for the models B and C are shown, and it is possible to add these models and addresses.

[0015] The available address ranges for models B and C are as follows. The available address ranges for input device X, output device Y, timer T, and counter C for model B, i.e., the X address, Y address, T address, and C address, are 0 to 1FFF (hexadecimal), 0 to 1FFF (hexadecimal), 0 to 2047 (decimal), and 0 to 2047 (decimal), respectively. The available address ranges for input device i, output device o, timer t, and counter c for model C, i.e., the i address, o address, t address, and c address, are 0 to 31F (hexadecimal), 0 to 21F (hexadecimal), 0 to 999 (decimal), and 0 to 2047 (decimal), respectively.

[0016] An example of the basic function table 22 is shown in FIG. 3. The basic function table 22 lists a number of basic functions corresponding to a number of programming languages. Each row lists a number of basic functions for each programming language, and each column lists the same basic function in each programming language. The international standard IEC61131-3 defines the following five types of programming languages ​​to be used in creating control programs. The five types of programming languages ​​are ladder diagram (LD language, ladder language), function block diagram (FBD language), structured text (ST language), instruction list (IL language), and sequential function chart (SFC language).

[0017] In Figure 3, programming language A is ladder language, programming language B is FBD language, and programming language is ST language, and each column with a basic function number has the same basic function written in each programming language. It is possible to add programming language types and basic functions, and for example, if the writing method is different even in the same programming language, it is possible to set it as a new basic function and write it. A basic function corresponds to a basic circuit in a circuit diagram.

[0018] In Fig. 3, in the example where the basic function number is 1, basic function Q1A written in programming language A, basic function Q1B written in programming language B, basic function Q1C written in programming language C, and basic function Q1D written in programming language D are described. Similarly, in the example where the basic function number is 2, basic function Q2A written in programming language A, basic function Q2B written in programming language B, basic function Q2C written in programming language C, and basic function Q2D written in programming language D are described. Specific examples of basic functions Q1A, Q1B, and Q1C are shown in Fig. 3.

[0019] The model selection unit 42 selects the model before conversion and the model after conversion from among the models set in the address range table 21. For example, the model selection unit 42 selects from the items of the pull-down menu 44 in the selection boxes 43a and 43b displayed on the display device 31 using the input device 32. Taking the model selection unit 42 shown in FIG. 4 as an example, the model before conversion is model C shown in the selection box 43a, and the model after conversion is model A shown in the selection box 43b. Note that, although the pull-down menu 44 is shown in the selection box 43b in FIG. 4, the pull-down menu 44 is also set in the selection box 43a. The model selection unit 42 outputs the information of the model before conversion and the model after conversion set in the selection boxes 43a and 43b to the conversion processing unit 13 as the first model information sigp1 and the second model information sigp2, respectively. In the example of FIG. 4, the first model information sigp1 indicates the model C, and the second model information sigp2 indicates the model A.

[0020] The reference language selection unit 52 selects a reference language Lr, which is a programming language after conversion, that is, a programming language to be used in the second control program Pg2, from among the programming languages ​​set in the basic function table 22. For example, the reference language selection unit 52 selects from the items of a pull-down menu 54 using the input device 32 in a selection box 53 displayed on the display device 31. Taking the reference language selection unit 52 shown in FIG. 4 as an example, the reference language Lr, which is a programming language after conversion, is shown to be language A. The reference language selection unit 52 outputs information on the reference language set in the selection box 53 to the conversion processing unit 13 as reference language information sigg. In the example of FIG. 4, the reference language information sigg indicates language A. Note that in FIG. 4, language A, language B, language C, and language D are listed as items in the pull-down menu 54, which are abbreviated notations of programming language A, programming language B, programming language C, and programming language D, respectively. Where appropriate, programming languages ​​A, B, C, and D will be described as languages ​​A, B, C, and D, respectively.

[0021] The conversion processing unit 13 includes a reference language conversion unit 15, an address conversion unit 16, and an error output unit 18. The reference language conversion unit 15 converts a basic function not written in the reference language Lr in the first control program Pg1 into a basic function written in the reference language Lr based on a basic function table 22. The address conversion unit 16 converts an address of a first device in the first control program Pg1 into an address of a second device in the second programmable logic controller based on an address range table 21. The error output unit 18 outputs error information sige when an error occurs in the conversion in the reference language conversion unit 15 and / or the address conversion unit 16.

[0022] The operation of the control program conversion device 1 of the first embodiment will be described. The control program acquisition unit 11 acquires the first control program Pg1 from the control program medium 2. The control program medium 2 is an auxiliary storage device such as a floppy disk, a USB (USB Universal Serial Bus, registered trademark) memory, or a server via communication. The control program conversion device 1 of the first embodiment performs conversion processing in the conversion processing unit 13 using the first control program Pg1, a preset address range table 21, and a basic function table 22 to generate the second control program Pg2. The conversion processing unit 13 performs conversion processing for each module of the first control program Pg1. In FIG. 1, an example is shown in which the control program output unit 19 outputs the second control program Pg2 to the control program medium 2, but it may be output to another control program medium 2 different from the control program medium 2 in which the first control program Pg1 is stored.

[0023] An example of a reference language conversion procedure performed by the reference language conversion unit 15 and an example of an address conversion procedure performed by the address conversion unit 16 will be described with reference to Fig. 5 and Fig. 6. Fig. 5 shows columns with basic function numbers 1, 2, and 3. The columns with function numbers 1 and 2 are as described above. In the example with basic function number 3, basic function Q3A written in programming language A, basic function Q3B written in programming language B, basic function Q3C written in programming language C, and basic function Q3D written in programming language D are written.

[0024] The reference language conversion unit 15 converts the basic function Q1C not described in the reference language Lr in the first control program Pg1 into the basic function Q1A described in the reference language Lr based on the basic function table 22 in which a plurality of basic functions Q1A to Q1D, Q2A to Q2D, Q3A to Q3D, etc. are described corresponding to a plurality of programming languages. More specifically, the reference language conversion unit 15 searches the basic function search information siga indicating the basic function Q1C in the basic function table 22, and acquires the basic function Q1A in the reference language Lr associated with the basic function determination information sigc whose basic function number is 1 as the basic function conversion information sigb. The reference language conversion unit 15 converts the basic function Q1C in the first control program Pg1 into the basic function Q1A acquired from the basic function table 22 (reference language conversion procedure). In this reference language conversion procedure, if there is a basic function of the first control program Pg1 that is not written in the reference language Lr and cannot be converted to the reference language Lr, the reference language conversion unit 15 outputs reference language conversion error information sige1 to the error output unit 18. The error output unit 18 outputs the reference language conversion error information sige1 as error information sige to the log file 25. The reference language conversion procedure is executed for all basic functions of the first control program Pg1. Note that the control program in the process of conversion, for which the address conversion procedure described below has already been executed, will also be referred to as the first control program Pg1.

[0025] The address conversion unit 16 converts the address of the first device in the first control program Pg1 into the address of the second device in the second programmable logic controller based on the address range table 21 in which the address ranges that can be set corresponding to the devices of the first programmable logic controller and the second programmable logic controller are described. More specifically, the address conversion unit 16 searches the column of the model C for the first address information sigd1 indicating the address of the first device (for example, the device whose device number is 1) in the address range table 21 for each first device, and acquires one unused address within the address range of the model A associated with the device information sigm whose device number is 1 as the second address information sigd2. The address conversion unit 16 converts the address of the first device in the first control program Pg1 into the address of the second device acquired from the address range table 21 (address conversion procedure). In this address conversion procedure, if there is an address of the first device described in the first control program Pg1 that could not be converted into the address of the second device, the address conversion unit 16 outputs the address conversion error information sige2 to the error output unit 18. The error output unit 18 outputs the address conversion error information sige2 as the error information sige to the log file 25. The address conversion procedure is executed for all addresses of the first device in the first control program Pg1. Note that the control program undergoing conversion work for which the reference language conversion procedure has already been executed is also referred to as the first control program Pg1.

[0026] An example of the log file 25 is shown in Fig. 8. In the log file 25, for example, an error number 61, a module name 62, and an error content 63 are recorded. In Fig. 8, an example of address conversion error information sige2 is shown on the line where the error number 61 is ER1, and an example of reference language conversion error information sige1 is shown on the line where the error number 61 is ER2. The line where the error number 61 is ER1 indicates that an address conversion error was detected in module 3, and the line where the error number 61 is ER2 indicates that an error in reference language conversion was detected in module 10.

[0027] Next, the operation of the control program conversion device 1 of the first embodiment will be described step by step with reference to the flowchart in Fig. 7. In step S1, the control program acquisition unit 11 acquires the first control program Pg1 stored in the control program medium 2 (control program acquisition procedure). Steps S2 to S11 are a conversion processing procedure in which the conversion processing unit 13 performs processing. In step S2, the conversion processing unit 13 sets the number of modules to convert the first control program Pg1, i.e., the number of conversion targets K (conversion target number setting procedure). In step S3, the number of processes N is set to 0 (process number initial setting procedure).

[0028] The first control program Pg1 is written in, for example, a text format, a CSV (Comma Separated Value) format, etc. In the control program acquisition procedure, the first control program Pg1 may be converted into one format, for example, a CSV format. Note that the international standard IEC61131-3 describes examples of text notation in ladder language and FBD language.

[0029] The number of conversion targets K is, for example, the number of modules into which the conversion processing unit 13 divides the first control program Pg1. For example, Mitsubishi Electric's programming tools use P devices and statements (comments). P devices are numbers beginning with P, such as P4200, and are a notation for distinguishing blocks of processing functions. Statements may be inserted into the processing content set by one P device. If P devices and statements are not used, multiple lines up to "end" are considered to be one module. When dividing modules, P devices, statements (comments), "end", etc. written in the first control program Pg1 are searched for and divided.

[0030] Also, a comment indicating each module, i.e., each conversion target, may be inserted in advance into the first control program Pg1, and the number of conversion targets K may be set based on the comment. For example, a comment with a number added to each module, such as module 1, module 2, etc. may be inserted. The procedure for inserting the comment indicating the conversion target may be executed in the procedure for setting the number of conversion targets.

[0031] The reason why the reference language conversion and address conversion are performed for each module, i.e., for each conversion target, is to perform the conversion process for modules that can be converted. If the conversion process is performed for the entire program at once, the entire conversion process will stop if an error occurs. In contrast, the control program conversion method executed by the control program conversion device 1 of the first embodiment can perform the conversion process for some modules.

[0032] In step S4, the reference language conversion unit 15 judges whether the programming language is the reference language Lr for each module, i.e., for each conversion target (reference language judgment procedure). If the programming language is not the reference language Lr, proceed to step S5, and if the programming language is the reference language Lr, proceed to step S8. In step S5, the reference language conversion unit 15 converts the basic function Q1C in the first control program Pg1 into the basic function Q1A obtained from the basic function table 22 (reference language conversion procedure). In step S6, it is judged whether there is an error in the reference language conversion procedure (first error judgment procedure). If there is an error, proceed to step S7, and if there is no error, proceed to step S8.

[0033] In step S8, the address conversion unit 16 converts the address of the first device in the first control program Pg1 to the address of the second device acquired from the address range table 21 (address conversion procedure). In step S9, it is determined whether there is an error in the address conversion procedure (second error determination procedure). If there is an error, the process proceeds to step S7, and if there is no error, the process proceeds to step S10. In step S7, the error output unit 18 outputs an error in the reference language conversion procedure as reference language conversion error information sige1, and outputs an error in the address conversion procedure as address conversion error information sige2 (error output procedure). After executing step S7, the process proceeds to step S10. In the reference language conversion error information sige1 and the address conversion error information sige2, the error output unit 18 indicates "N" of the current processing number N as module N. Module 3 and module 10 in the log file 25 shown in FIG. 8 are the fourth processed module and the eleventh processed module, respectively.

[0034] In step S10, the number of processes N is updated (processing number update procedure). The number of processes N before the update is updated by adding 1. Then, in step S11, it is determined whether the number of processes N is less than the number of conversion targets K (processing number determination procedure). If the number of processes N is less than the number of conversion targets K, the process returns to step S4, and steps S4 to S11 are repeated. If the number of processes N has reached the number of conversion targets K in step S11, the process ends.

[0035] The control program conversion device 1 of the first embodiment can convert the first control program Pg1, which is an old control program acquired from the control program medium 2, into the second control program Pg2, which is a new control program, by executing a reference language conversion procedure and an address conversion procedure by the conversion processing unit 13 based on the basic function table 22 and the address range table 21. As a result, the control program conversion device 1 of the first embodiment can automatically convert the first control program Pg1 into the second control program Pg2 that controls the second PLC, which is a new PLC, and therefore it is possible to improve the efficiency of program conversion compared to the case where a program is redesigned and produced from scratch. In addition, the control program conversion device 1 of the first embodiment includes a conversion processing unit 13 that converts a programming language other than the reference language Lr used in the first control program Pg1 into a preset reference language Lr and converts the address of the first device in the first control program Pg1 into the address of the second device in the second programmable logic controller, so that the work of changing the control program can be shortened when updating the PLC, even if the programming language is different.

[0036] The control program conversion method executed by the control program conversion device 1 of the first embodiment can convert the first control program Pg1, which is an old control program acquired from the control program medium 2 in the control program acquisition procedure, into the second control program Pg2, which is a new control program, by executing a reference language conversion procedure and an address conversion procedure included in the conversion procedure executed by the conversion processing unit 13 based on the basic function table 22 and the address range table 21. As a result, the control program conversion method of the first embodiment can automatically convert the first control program Pg1 into the second control program Pg2 that controls the second PLC, which is a new PLC, and therefore it is possible to improve the efficiency of program conversion compared to the case where a program is redesigned and produced from scratch. In addition, the control program conversion method of the first embodiment converts a programming language other than the reference language Lr used in the first control program Pg1 into a preset reference language Lr and executes a conversion procedure that converts the address of the first device in the first control program Pg1 into the address of the second device in the second programmable logic controller, so that the work of changing the control program can be shortened when updating the PLC, even if the programming language is different.

[0037] The control program conversion device 1 of the first embodiment may execute the flowchart shown in FIG. 9. The flowchart in FIG. 9 differs from the flowchart in FIG. 7 in that it ends after executing step S7. In the case of the flowchart in FIG. 9, the conversion process can be performed on modules up to the time when an error occurs, so that the conversion process can be performed on some modules as well, as in the flowchart in FIG. 7. When executing the flowchart in FIG. 7, that is, when executing the first conversion process method, the conversion processing unit 13 processes as follows. When a basic function not listed in the basic function table 22 is present in the first control program Pg1, the conversion processing unit 13 maintains the contents of the basic function as is, and when there is an address of the first device that cannot be converted to an address within the range of the address range table, the conversion processing unit 13 maintains the address as is and generates the second control program Pg2. When executing the flowchart in FIG. 7, that is, when executing the first conversion process method, the number of modules that can be converted is greater than when executing the flowchart in FIG. 9, that is, when executing the second conversion process method, and it is possible to improve the efficiency of program conversion.

[0038] The reference language determination procedure is performed, for example, based on a description that can distinguish the programming language. Note that a comment that distinguishes the programming language may be inserted in advance into the first control program Pg1, and the reference language determination procedure may be performed based on the comment. Examples of the comment that distinguishes the programming language include ladder language, FBD language, ST language, IL language, and SFC language. When multiple programming languages ​​are used in the first control program Pg1, a module can be set for each programming language to generate the second control program Pg2 written in the reference language Lr. When multiple programming languages ​​are used, a comment indicating each module, i.e., each conversion target, may be inserted in advance into the first control program Pg1.

[0039] The functions of the functional blocks of the control unit 110 may be realized by the processor 98 and memory 99 shown in Fig. 10. In this case, the control unit 110 is realized by the processor 98 executing a program stored in the memory 99. Also, a plurality of processors 98 and a plurality of memories 99 may cooperate to execute each function. The control unit 110 is realized by the processor 98 executing a program stored in the memory 99, that is, a control program conversion program. The control program conversion program of the first embodiment has the effect of the control program conversion method of the first embodiment by having the processor 98 execute each procedure of steps S1 to S11.

[0040] Before ladder languages ​​became mainstream, various companies used various programming languages ​​for PLC control programs. Some of these programming languages ​​were not common, and when a PLC using such a programming language needs to be updated, it takes more time than usual to create the program because there are fewer engineers who can read the program due to the retirement of the engineers who were using the language at the time. However, the control program conversion device 1 of the first embodiment, the control program conversion method of the first embodiment, and the conversion program for the control program of the first embodiment can be converted by an engineer who can read the program by adding basic functions of the language to the basic function table 22, so that other engineers can perform the conversion process. In addition, when the control program of the PLC is complex, even if some modules cannot be converted, if other modules can be converted automatically, the work of changing the control program of the PLC can be shortened compared to manually recreating all the modules.

[0041] As described above, the control program conversion device 1 of the first embodiment converts the first control program Pg1 that controls the first programmable logic controller into the second control program Pg2 that controls the second programmable logic controller. The preset programming language used in the second control program Pg2 is the reference language Lr, the device of the first programmable logic controller described in the first control program Pg1 is the first device, and the device corresponding to the first device in the second programmable logic controller is the second device. The control program conversion device 1 of the first embodiment includes a control program acquisition unit 11 that acquires the first control program Pg1, and a conversion processing unit 13 that converts a programming language other than the reference language Lr used in the first control program Pg1 into the reference language Lr and converts the address of the first device in the first control program Pg1 into the address of the second device in the second programmable logic controller. The conversion processing unit 13 includes a reference language conversion unit 15 that converts a basic function Q1C not described in the reference language Lr in the first control program Pg1 into a basic function Q1A described in the reference language Lr based on a basic function table 22 in which a plurality of basic functions Q1A to Q1D and Q2A to Q2D are described corresponding to a plurality of programming languages, and an address conversion unit 16 that converts an address of a first device in the first control program Pg1 into an address of a second device in the second programmable logic controller based on an address range table 21 in which a settable address range is described corresponding to the devices of the first programmable logic controller and the second programmable logic controller. With this configuration, the control program conversion device 1 of the first embodiment includes the conversion processing unit 13 that converts a programming language other than the reference language Lr used in the first control program Pg1 into a preset reference language Lr and converts an address of a first device in the first control program Pg1 into an address of a second device in the second programmable logic controller, so that when updating the PLC, the work of changing the control program can be shortened even if the programming language is different.

[0042] Moreover, the control program conversion method of the first embodiment converts a first control program Pg1 that controls a first programmable logic controller into a second control program Pg2 that controls a second programmable logic controller. A preset programming language used in the second control program Pg2 is defined as a reference language Lr, a device of the first programmable logic controller described in the first control program Pg1 is defined as a first device, and a device corresponding to the first device in the second programmable logic controller is defined as a second device. The control program conversion method of the first embodiment includes a control program acquisition procedure for acquiring the first control program Pg1, and a conversion processing procedure for converting a programming language other than the reference language Lr used in the first control program Pg1 into the reference language Lr and converting an address of the first device in the first control program Pg1 into an address of the second device in the second programmable logic controller. The conversion procedure includes a reference language conversion procedure for converting a basic function Q1C not described in the reference language Lr in the first control program Pg1 into a basic function Q1A described in the reference language Lr based on a basic function table 22 in which a plurality of basic functions Q1A to Q1D and Q2A to Q2D are described corresponding to a plurality of programming languages, and an address conversion procedure for converting an address of a first device in the first control program Pg1 into an address of a second device in the second programmable logic controller based on an address range table 21 in which a settable address range is described corresponding to the devices of the first programmable logic controller and the second programmable logic controller. With this configuration, the control program conversion method of the first embodiment includes a conversion procedure for converting a programming language other than the reference language Lr used in the first control program Pg1 into a preset reference language Lr and converting an address of a first device in the first control program Pg1 into an address of a second device in the second programmable logic controller, so that when updating the PLC, even if the programming language is different, the work of changing the control program can be shortened.

[0043] In addition, the conversion program of the control program of the first embodiment converts the first control program Pg1 for controlling the first programmable logic controller into the second control program Pg2 for controlling the second programmable logic controller by the processor 98. The preset programming language used in the second control program Pg2 is the reference language Lr, the device of the first programmable logic controller described in the first control program Pg1 is the first device, and the device corresponding to the first device in the second programmable logic controller is the second device. The conversion program of the control program of the first embodiment causes the processor 98 to execute a control program acquisition procedure, a reference language conversion procedure, and an address conversion procedure. The control program acquisition procedure acquires the first control program Pg1. The reference language conversion procedure converts the basic function Q1C not described in the reference language Lr in the first control program Pg1 into the basic function Q1A described in the reference language Lr based on the basic function table 22 in which a plurality of basic functions Q1A to Q1D and Q2A to Q2D are described corresponding to a plurality of programming languages. The address conversion procedure converts the address of the first device in the first control program Pg1 into the address of the second device in the second programmable logic controller based on an address range table 21 in which address ranges that can be set corresponding to devices in the first programmable logic controller and the second programmable logic controller are described. With this configuration, the conversion program for the control program of the first embodiment causes the processor 98 to execute a reference language conversion procedure for converting a programming language other than the reference language Lr used in the first control program Pg1 into a preset reference language Lr, and an address conversion procedure for converting the address of the first device in the first control program Pg1 into the address of the second device in the second programmable logic controller, so that when updating the PLC, the work of changing the control program can be shortened even if the programming language is different.

[0044] Embodiment 2 FIG. 11 is a diagram showing a configuration of a control program conversion device according to a second embodiment. FIG. 12 is a diagram showing an example of the design format table of FIG. 11, and FIG. 13 is a diagram showing format search information and format conversion information of FIG. 11. FIG. 14 is a flowchart showing a first example of the operation of the conversion processing unit of FIG. 11, and FIG. 15 is a diagram showing an example of a log file of FIG. 11. FIG. 16 is a flowchart showing a second example of the operation of the conversion processing unit of FIG. 11. The control program conversion device 1 of the second embodiment differs from the control program conversion device 1 of the first embodiment in that the conversion processing unit 13 includes a design format conversion unit 17 and the storage unit 90 includes a design format table 23. The parts different from the control program conversion device 1 of the first embodiment will be mainly described.

[0045] Even if the control program of a PLC is written in the same programming language, the same function can be created in various design formats. If the engineers who design the program create the program in various design formats, it takes time for other engineers to decipher the program, so it is desirable to unify the design formats as much as possible. For this reason, design formats are defined for specific basic functions. The design format can be called a design standard. When the design format is defined, the design format may be revised in order to create a program in a better way. In this case, since the control program conversion device 1 of the first embodiment does not correspond to the revised design format, work is required to change the program to one that conforms to the current design format. The control program conversion device 1 of the second embodiment is a control program conversion device that can correspond to the revised design format.

[0046] An example of the design format table 23 is shown in FIG. 12. For each design format number, the functions before and after the change are listed. Three design formats using ladder language are specifically listed in FIG. 12. The functions after the change are listed for the latest design format. It is also possible to add a design format to the design format table 23. Here, it is written in ladder language, but it is preferable to write it in the reference language Lr. The reference language Lr may be written in a language other than ladder language.

[0047] In FIG. 12, in the row with design format number 1, basic function R1a is written before the change, and basic function R1b is written after the change. In the row with design format number 2, basic function R2a is written before the change, and basic function R2b is written after the change, and in the row with design format number 3, basic function R3a is written before the change, and basic function R3b is written after the change. Basic function R1b and basic function R2b have the same content. This is because basic function R1a was revised to basic function R2a, and was further revised to basic function R1b or basic function R2b. In this way, since the design format may be revised multiple times, one frame before the change for one design format number may be allowed to write multiple basic functions. In this case, basic function R2a is written together with basic function R1b before the change in the row with design format number 1, and basic function R1b is written after the change. The basic function R2a, which has been moved to the row with the design format number 1, may have its code changed, changing the design format number from 3 to 2, or the design format number 2 may be omitted.

[0048] The conversion processing unit 13 of the second embodiment includes a reference language conversion unit 15, an address conversion unit 16, a design format conversion unit 17, and an error output unit 18. The reference language conversion unit 15 and the address conversion unit 16 are as described in the first embodiment. The design format conversion unit 17 converts some of the basic functions of the first control program Pg1 from the first design format to the second design format based on a design format table 23 in which a second design format (design format after change), which is a design format applied to some basic functions in the second control program Pg2, and a first design format (design format before change), which is used in other programmable logic controllers including the first programmable logic controller and is a design format of a basic function targeted by the second design format, are associated with each other. The error output unit 18 outputs error information sige when an error occurs in the conversion in the reference language conversion unit 15, the address conversion unit 16, and the design format conversion unit 17.

[0049] An example of the design format conversion procedure performed by the design format conversion unit 17 will be described with reference to FIG. 13. In FIG. 13, rows with design format numbers 1, 2, 3, and 4 are shown. The rows with design format numbers 1, 2, and 3 are as described above. In the row with design format number 4, a basic function R4a is described before the change, and a basic function R4b is described after the change. Based on the design format table 23, the design format conversion unit 17 converts the basic functions R1a to R4a described in the first design format of the first control program Pg1 into basic functions R1b to R4b described in the second design format. More specifically, the design format conversion unit 17 sequentially acquires the basic functions before the change from the design format table 23 as format information sigr, and determines whether the format information sigr is in the first control program Pg1. When the design format conversion unit 17 determines that the format information sigr is in the first control program Pg1, it searches the design format table 23 for the basic function of the format information sigr as format search information sigs1, determines the design format number of the basic function as format determination information sigs3, and acquires the basic function associated with the format determination information sigs3 as format conversion information sigs2. An example will be described in which the basic function determined to be in the first control program Pg1 is the basic function R1a. The design format conversion unit 17 searches the design format table 23 for format search information sigs1 indicating the basic function R1a, and acquires the basic function R1b associated with the format determination information sigs3 whose design format number is 1 as the format conversion information sigs2. The design format conversion unit 17 converts the basic function R1a in the first control program Pg1 into the basic function R1b acquired from the design format table 23 (design format conversion procedure). In this design format conversion procedure, if an error occurs, the design format conversion unit 17 outputs design format conversion error information sige3 to the error output unit 18. The error output unit 18 outputs the design format conversion error information sige3 as error information sige to the log file 25. This design format conversion procedure is executed for each module, i.e., for each conversion target.

[0050] FIG. 15 shows an example of the log file 25. In the log file 25, for example, an error number 61, a module name 62, and an error content 63 are described. In FIG. 15, an example of address conversion error information sige2 is shown in the line with error number 61 ER1, an example of reference language conversion error information sige1 is shown in the line with error number 61 ER2, and an example of design format conversion error information sige3 is shown in the line with error number 61 ER3. The line with error number 61 ER1 indicates that an address conversion error has been detected in module 3, and the line with error number 61 ER2 indicates that an error in reference language conversion has been detected in module 10. The line with error number 61 ER3 indicates that an error in design format conversion has been detected in module 20.

[0051] Next, the operation of the control program conversion device 1 of the second embodiment will be described step by step with reference to the flowchart of FIG. 16. Steps S1 to S6 and steps S8 to S11 are as described in the first embodiment. If there is no error in step S9, the process proceeds to step S21. In step S21, the design format conversion unit 17 converts the basic functions R1a to R4a described in the first design format in the first control program Pg1 into basic functions R1b to R4b described in the second design format acquired from the design format table 23 (design format conversion procedure). Thereafter, in step S22, it is determined whether there is an error in the design format conversion procedure (third error determination procedure). If there is an error, the process proceeds to step S7, and if there is no error, the process proceeds to step S10.

[0052] In step S7, the error output unit 18 outputs an error in the reference language conversion procedure as reference language conversion error information sige1, an error in the address conversion procedure as address conversion error information sige2, and an error in the design format conversion procedure as design format conversion error information sige3 (error output procedure). After executing step S7, the process proceeds to step S10. In the reference language conversion error information sige1, the address conversion error information sige2, and the design format conversion error information sige3, the error output unit 18 indicates the "N" of the current processing number N as module N. Module 3, module 10, and module 20 shown in FIG. 15 are the fourth processed module, the eleventh processed module, and the twenty-first processed module, respectively.

[0053] The control program conversion device 1 of the second embodiment has the same configuration as the control program conversion device 1 of the first embodiment, except that the design format conversion unit 17 is added to the conversion processing unit 13 and the design format table 23 is added to the storage unit 90. The control program conversion device 1 of the second embodiment has the design format conversion unit 17 added to the conversion processing unit 13 and the design format table 23 added to the storage unit 90, so that the first control program Pg1, which is an old control program that does not correspond to the revised design format, can be changed to a program that complies with the current design format. Therefore, the control program conversion device 1 of the second embodiment can make the program conversion more efficient than the control program conversion device 1 of the first embodiment, and can shorten the work of changing the control program more than the control program conversion device 1 of the first embodiment.

[0054] The control program conversion device 1 of the second embodiment may execute the flowchart shown in FIG. 16. The flowchart in FIG. 16 differs from the flowchart in FIG. 14 in that the process ends after step S7 is executed. In the case of the flowchart in FIG. 16, the conversion process can be performed on modules up to the time when an error occurs, so that the conversion process can be performed on some modules as well, as in the flowchart in FIG. 14. When the flowchart in FIG. 14 is executed, that is, when the first conversion process method is executed, the conversion processing unit 13 processes as follows. When a basic function not listed in the basic function table 22 is present in the first control program Pg1, the conversion processing unit 13 maintains the contents of the basic function as it is, when there is an address of the first device that cannot be converted to an address within the range of the address range table, the conversion processing unit 13 maintains the address as it is, and when there is an error in the design format conversion procedure, the conversion processing unit 13 maintains the contents of the basic function as it is to generate the second control program Pg2. When the flowchart in FIG. 14 is executed, that is, when the first conversion process method is executed, the number of modules that can be converted is greater than when the flowchart in FIG. 16 is executed, that is, when the second conversion process method is executed, and it is possible to improve the efficiency of program conversion.

[0055] The functions of the functional blocks of the control unit 110 in the second embodiment may be realized by the processor 98 and memory 99 shown in FIG. 10. In this case, the control unit 110 is realized by the processor 98 executing a program stored in the memory 99. Also, a plurality of processors 98 and a plurality of memories 99 may cooperate to execute each function. The control unit 110 is realized by the processor 98 executing a program stored in the memory 99, that is, a control program conversion program. The control program conversion program of the second embodiment has the effect of the control program conversion method of the second embodiment by having the processor 98 execute each procedure of steps S1 to S11, step S21, and step S22.

[0056] As described above, the control program conversion device 1 of the second embodiment includes a design format table 23 and a design format conversion unit 17 in addition to the configuration of the control program conversion device 1 of the first embodiment. The design format conversion unit 17 converts some of the basic functions of the first control program Pg1 from the first design format to the second design format based on the design format table 23 in which the second design format, which is a design format applied to some of the basic functions R1a to R4a in the second control program Pg2, and the first design format, which is used in other programmable logic controllers including the first programmable logic controller and is a design format of the basic functions R1b to R4b targeted by the second design format, are associated with each other. The control program conversion device 1 of the second embodiment includes a conversion processing unit 13 that converts a programming language other than the reference language Lr used in the first control program Pg1 into a preset reference language Lr and converts the address of the first device in the first control program Pg1 into the address of the second device in the second programmable logic controller, so that the work of changing the control program can be shortened when updating the PLC even if the programming language is different.

[0057] The control program conversion method of the second embodiment further includes a design format conversion procedure in addition to the procedure of the control program conversion method of the first embodiment. The design format conversion procedure converts some of the basic functions of the first control program Pg1 from the first design format to the second design format based on a design format table 23 in which a second design format, which is a design format applied to some of the basic functions R1b to R4b in the second control program, and a first design format, which is used in other programmable logic controllers including the first programmable logic controller and is a design format of the basic functions R1b to R4b targeted by the second design format, are associated with each other. The control program conversion method of the second embodiment includes a conversion processing procedure that converts a programming language other than the reference language Lr used in the first control program Pg1 into a preset reference language Lr and converts the address of the first device in the first control program Pg1 into the address of the second device in the second programmable logic controller, so that the work of changing the control program can be shortened when updating the PLC even if the programming language is different.

[0058] The conversion program of the control program of the second embodiment causes the processor 98 to execute a design format conversion procedure in addition to the procedure of the control program conversion method of the first embodiment. The design format conversion procedure converts some of the basic functions of the first control program Pg1 from the first design format to the second design format based on a design format table 23 in which a second design format, which is a design format applied to some of the basic functions R1b to R4b in the second control program, and a first design format, which is used in other programmable logic controllers including the first programmable logic controller and is a design format of the basic functions R1b to R4b targeted by the second design format, are associated with each other. The conversion program of the control program of the second embodiment causes the processor 98 to execute a reference language conversion procedure that converts a programming language other than the reference language Lr used in the first control program Pg1 into a preset reference language Lr, and an address conversion procedure that converts the address of the first device in the first control program Pg1 into the address of the second device in the second programmable logic controller. Therefore, when updating the PLC, even if the programming language is different, the work of changing the control program can be shortened.

[0059] In addition, although various exemplary embodiments and examples are described in this application, various features, aspects, and functions described in one or more embodiments are not limited to application in a specific embodiment, but can be applied to the embodiments alone or in various combinations. Therefore, countless modifications not illustrated are expected within the scope of the technology disclosed in this specification. For example, this includes cases in which at least one component is modified, added, or omitted, and further cases in which at least one component is extracted and combined with components of other embodiments.

[0060] Although the preferred embodiments have been described in detail above, the present invention is not limited to the above-described embodiments, and various modifications and substitutions can be made to the above-described embodiments without departing from the scope of the claims.

[0061] Various aspects of the present disclosure are summarized below as appendices.

[0062] (Appendix 1) A control program conversion device for converting a first control program for controlling a first programmable logic controller into a second control program for controlling a second programmable logic controller, a preset programming language used in the second control program is a reference language; The device of the first programmable logic controller described in the first control program is a first device; a device corresponding to the first device in the second programmable logic controller is a second device; a control program acquisition unit that acquires the first control program; converting a programming language other than the reference language used in the first control program into the reference language; and a conversion processing unit that converts an address of a first device in the first control program into an address of a second device in the second programmable logic controller, The conversion processing unit is a reference language conversion unit that converts the basic functions not written in the reference language in the first control program into the basic functions written in the reference language based on a basic function table in which a plurality of basic functions are described corresponding to a plurality of programming languages; an address conversion unit that converts an address of the first device in the first control program into an address of the second device in the second programmable logic controller based on an address range table in which address ranges that can be set corresponding to devices of the first programmable logic controller and the second programmable logic controller are described; A control program conversion device comprising: (Appendix 2) The conversion processing unit is a design format conversion unit that converts a part of the basic functions of the first control program from the first design format to the second design format based on a design format table in which a second design format, which is a design format applied to a part of the basic functions in the second control program, and a first design format, which is used in other programmable logic controllers including the first programmable logic controller and is a design format for the basic functions targeted by the second design format, are associated with each other. 2. The control program conversion device according to claim 1. (Appendix 3) The conversion processing unit is If the first control program has a basic function that is not listed in the basic function table, the content of the basic function is maintained as is; If there is an address of the first device that cannot be converted into an address within the range of the address range table, the address is maintained as it is; 3. A control program conversion device according to claim 1 or 2. (Appendix 4) The conversion processing unit is When the basic function of the first control program is not written in the reference language and cannot be converted into the reference language by the reference language conversion unit, or When the address of the first device described in the first control program cannot be converted into the address of the second device by the address conversion unit, An error output unit is provided for outputting error information. 4. A control program conversion device according to claim 1. (Appendix 5) 1. A control program conversion method for converting a first control program for controlling a first programmable logic controller into a second control program for controlling a second programmable logic controller, comprising the steps of: a preset programming language used in the second control program is a reference language; The device of the first programmable logic controller described in the first control program is a first device; a device corresponding to the first device in the second programmable logic controller is a second device; a control program acquisition step for acquiring the first control program; converting a programming language other than the reference language used in the first control program into the reference language; and a conversion procedure for converting an address of a first device in the first control program into an address of a second device in the second programmable logic controller, The conversion process includes the steps of: a reference language conversion step of converting a basic function not written in the reference language in the first control program into a basic function written in the reference language based on a basic function table in which a plurality of basic functions are written corresponding to a plurality of programming languages; an address conversion step of converting an address of the first device in the first control program into an address of the second device in the second programmable logic controller based on an address range table in which address ranges that can be set corresponding to devices of the first programmable logic controller and the second programmable logic controller are described; A control program conversion method comprising the steps of: (Appendix 6) A control program conversion program for converting, by a processor, a first control program for controlling a first programmable logic controller into a second control program for controlling a second programmable logic controller, a preset programming language used in the second control program is a reference language; The device of the first programmable logic controller described in the first control program is a first device; a device corresponding to the first device in the second programmable logic controller is a second device; The processor, a control program acquisition step for acquiring the first control program; a reference language conversion step of converting a basic function not written in the reference language in the first control program into a basic function written in the reference language based on a basic function table in which a plurality of basic functions are written corresponding to a plurality of programming languages; an address conversion step of converting an address of the first device in the first control program into an address of the second device in the second programmable logic controller based on an address range table in which address ranges that can be set corresponding to devices of the first programmable logic controller and the second programmable logic controller are described; A conversion program for the control program to execute the above. [Explanation of symbols]

[0063] 1...control program conversion device, 11...control program acquisition unit, 13...conversion processing unit, 15...reference language conversion unit, 16...address conversion unit, 17...design format conversion unit, 18...error output unit, 21...address range table, 22...basic function table, 23...design format table, 98...processor, Lr...reference language, Pg1...first control program, Pg2...second control program, Q1A, Q1B, Q1C, Q1D...basic function, Q2A, Q2B, Q2C, Q2D...basic function, Q3A, Q3B, Q3C, Q3D...basic function, R1a, R2a, R3a, R4a...basic function, R1b, R2b, R3b, R4b...basic function, sige...error information

Claims

1. A control program conversion device for converting a first control program for controlling a first programmable logic controller into a second control program for controlling a second programmable logic controller, a preset programming language used in the second control program is a reference language; The device of the first programmable logic controller described in the first control program is a first device; a device corresponding to the first device in the second programmable logic controller is a second device; a control program acquisition unit that acquires the first control program; converting a programming language other than the reference language used in the first control program into the reference language; and a conversion processing unit that converts an address of a first device in the first control program into an address of a second device in the second programmable logic controller, The conversion processing unit is a reference language conversion unit that converts the basic functions not written in the reference language in the first control program into the basic functions written in the reference language based on a basic function table in which a plurality of basic functions are described corresponding to a plurality of programming languages; an address conversion unit that converts an address of the first device in the first control program into an address of the second device in the second programmable logic controller based on an address range table in which address ranges that can be set corresponding to devices of the first programmable logic controller and the second programmable logic controller are described; A control program conversion device comprising:

2. The conversion processing unit is a design format conversion unit that converts a part of the basic functions of the first control program from the first design format to the second design format based on a design format table in which a second design format, which is a design format applied to a part of the basic functions in the second control program, and a first design format, which is used in other programmable logic controllers including the first programmable logic controller and is a design format for the basic functions targeted by the second design format, are associated with each other.

2. The control program conversion device according to claim 1.

3. The conversion processing unit is If the first control program has a basic function that is not listed in the basic function table, the content of the basic function is maintained as is; If there is an address of the first device that cannot be converted into an address within the range of the address range table, the address is maintained as it is; 3. The control program conversion device according to claim 1 or 2.

4. The conversion processing unit is When the basic function of the first control program is not written in the reference language and cannot be converted into the reference language by the reference language conversion unit, or When the address of the first device described in the first control program cannot be converted into the address of the second device by the address conversion unit, An error output unit is provided for outputting error information.

3. The control program conversion device according to claim 1 or 2.

5. 1. A control program conversion method for converting a first control program for controlling a first programmable logic controller into a second control program for controlling a second programmable logic controller, comprising the steps of: a preset programming language used in the second control program is a reference language; The device of the first programmable logic controller described in the first control program is a first device; a device corresponding to the first device in the second programmable logic controller is a second device; a control program acquisition step for acquiring the first control program; converting a programming language other than the reference language used in the first control program into the reference language; and a conversion procedure for converting an address of a first device in the first control program into an address of a second device in the second programmable logic controller, The conversion process includes the steps of: a reference language conversion step of converting a basic function not written in the reference language in the first control program into a basic function written in the reference language based on a basic function table in which a plurality of basic functions are written corresponding to a plurality of programming languages; an address conversion step of converting an address of the first device in the first control program into an address of the second device in the second programmable logic controller based on an address range table in which address ranges that can be set corresponding to devices of the first programmable logic controller and the second programmable logic controller are described; A control program conversion method comprising the steps of:

6. A control program conversion program for converting, by a processor, a first control program for controlling a first programmable logic controller into a second control program for controlling a second programmable logic controller, a preset programming language used in the second control program is a reference language; The device of the first programmable logic controller described in the first control program is a first device; a device corresponding to the first device in the second programmable logic controller is a second device; The processor, a control program acquisition step for acquiring the first control program; a reference language conversion step of converting a basic function not written in the reference language in the first control program into a basic function written in the reference language based on a basic function table in which a plurality of basic functions are written corresponding to a plurality of programming languages; an address conversion step of converting an address of the first device in the first control program into an address of the second device in the second programmable logic controller based on an address range table in which address ranges that can be set corresponding to devices of the first programmable logic controller and the second programmable logic controller are described; A conversion program for the control program to execute the above.

Citation Information

Patent Citations

  • Program converter for sequencer

    JP1994187015A

Cited By

  • Extended input control system, input control device, and control method

    JP7845744B1

  • Apparatus and method for automatically generating PLC control logic using natural language and based on generative ai

    KR102882027B1