Data processing device, data processing method, and data processing program

The data processing device simplifies the generation of control programs for manufacturing equipment by using a program management unit to create partial programs based on control procedures, addressing the inefficiency in existing methods and reducing development time and complexity.

WO2024194965A1PCT designated stage expired Publication Date: 2024-09-26MITSUBISHI ELECTRIC CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/010766
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

The complexity of manufacturing equipment requires longer development times for PLC programs due to the lack of an efficient method for writing programs using state transition notation and event control notation, necessitating developers to create entire programs according to control procedures, thereby increasing the number of development steps.

Method used

A data processing device and method that includes a control procedure data acquisition unit, a program management unit generating partial programs based on conditions and control variables, and a program generation unit that combines these to create a control program reflecting the control procedure, reducing the number of development steps by simplifying the generation process.

Benefits of technology

The solution enables the generation of control programs that reflect control procedures using state transition or event control notation, reducing the number of development man-hours while maintaining ease of maintenance for manufacturing equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023010766_26092024_PF_FP
    Figure JP2023010766_26092024_PF_FP
Patent Text Reader

Abstract

In the present invention, a control procedure data acquisition unit (101) acquires control procedure data (200) in which the control procedure is described by using a plurality of ordered conditions and a plurality of control variables which are associated with corresponding conditions, the corresponding conditions being any of the conditions, and in which values are substituted according to the success or failure of the corresponding conditions. A program management unit (102) selects each condition, and generates, for each selected selection condition, a state determination block that determines the value of the state variable of the selection condition on the basis of the success or failure of the selection condition and the value of the state variable of the preceding condition whose order position precedes the selection condition. The program management unit (102) selects each control variable, and generates, for each selected selection control variable, a control execution block that determines a value to be substituted for the selection control variable on the basis of the value of the state variable of the corresponding condition of the selection control variable. Furthermore, the program management unit (102) uses the state determination block and the control execution block to generate a control program (300) in which the control procedure is reflected.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing device, data processing method and data processing program

[0001] The present disclosure relates to generating programs.

[0002] This disclosure describes the generation of control programs (hereinafter simply referred to as programs) primarily used in manufacturing equipment and the like. Manufacturing equipment is controlled by a controller such as a PLC (Programmable Logic Controller). The control content differs for each piece of manufacturing equipment. For this reason, developers of manufacturing equipment and / or the devices that make up the manufacturing equipment develop programs according to the control specifications. PLC programs are often written in languages ​​defined by IEC 61131-3, with ladder logic being particularly common. The more complex the manufacturing equipment, the larger the program volume and the greater the development man-hours required for PLC programs. Patent Documents 1 to 3, for example, disclose techniques to support the development of PLC programs.

[0003] Patent No. 3426405 JP 5-173609 A JP 2021-149853 A

[0004] When a problem occurs with manufacturing equipment, maintenance personnel often check the program to determine the cause. For example, maintenance personnel check the values ​​of each variable in the program when the problem occurs. For this reason, control equipment programs are required to not only operate according to the required specifications, but also be written in a way that is easy to understand for people other than the program developer. State transition notation (Reference 1) and step control notation (Reference 2) are sometimes used as programming notations using ladder languages. Hereafter, both will be collectively referred to as state transition notation. Reference 1: Essential Collection of Sequence Control Programming Strategies Using PLCs Sequence, PLC, Control, Mechatronics Machinery | Books & Magazines Nikkan Kogyo Shimbun (nikkan.co.jp) Reference 2: Step Control / Sequence Control Course (plckouza.com)

[0005] A program written using state transition notation consists of a state judgment block and a control execution block, as shown in Figure 17. The state judgment block is a code block that stores in variables how sequential actions progress one by one according to state changes. The control execution block is a code block that switches output processing according to each state. In the example of Figure 17, the values ​​of state variables M0 to M3 in the state judgment block indicate the state. Furthermore, the values ​​of condition variables X0, X1, and X2 indicate whether the transition condition is met. As the values ​​of condition variables X0, X1, and X2 sequentially turn ON, the values ​​of state variables M1 to M3 sequentially turn ON. When the value of state variable M3 turns ON, all the values ​​of state variables M0 to M3 turn OFF, and processing returns to the initial state. Furthermore, in the control execution block, output variable Y10 indicates the output value to the controlled object. The value of output variable Y10 turns ON when the value of state variable M1 turns ON. On the other hand, when the value of state variable M2 turns ON, the value of output variable Y10 turns OFF.

[0006] Event control notation (Reference 1) is also sometimes used as a similar notation. A program written in event control notation also consists of a state judgment block and a control execution block, as shown in the example of Figure 18. In a program written in event control notation, events that occur in sequence are judged, and output is controlled according to the event judgment results.

[0007] The differences between state transition notation and event control notation are as follows: In a program using state transition notation, the values ​​of all state variables M0 to M3 become OFF after the final state is reached. On the other hand, in a program using event control notation, the previous state becomes OFF when a state changes. In the example of Figure 18, when the value of state variable M1 becomes ON, the value of state variable M0 becomes OFF. Furthermore, when the value of state variable M2 becomes ON, the value of state variable M1 becomes OFF. Furthermore, when the value of state variable M3 becomes OFF, the value of state variable M2 becomes ON. Furthermore, when the value of state variable M0 becomes ON, the value of state variable M3 becomes OFF. State transition notation and event control notation are used differently depending on the application, field of manufacturing equipment, etc.

[0008] Currently, there is no established method for easily writing programs using such state transition notation and event control notation. This requires program developers to create the entire program in accordance with the control procedures, resulting in a problem of increased development man-hours. The primary objective of the present disclosure is to solve this problem. More specifically, the primary objective of the present disclosure is to reduce the development man-hours required for program generation.

[0009] The data processing device according to the present disclosure has: a control procedure data acquisition unit that acquires control procedure data in which a control procedure is described using a plurality of ordered conditions and a plurality of control variables, each of which is associated with one of the plurality of conditions and to which a value is assigned depending on whether the associated condition, that is, a corresponding condition, is satisfied; a first partial program generation unit that generates, according to the control procedure, a first partial program that sequentially selects each condition of the plurality of conditions and, for each selected condition, determines the value of a state variable of the selected condition based on whether the selected condition is satisfied and the value of a state variable of a preceding condition, that is, a condition ordered earlier than the selected condition; a second partial program generation unit that generates, according to the control procedure, a second partial program that sequentially selects each control variable of the plurality of control variables and, for each selected control variable, that is, a control variable, determines a value to be assigned to the selected control variable based on the value of the state variable of the corresponding condition of the selected control variable; and a program generation unit that generates a program in which the control procedure is reflected using the first partial program and the second partial program.

[0010] According to the present disclosure, it is possible to generate a program that reflects a control procedure, thereby reducing the number of development steps.

[0011] 1 is a diagram showing an example of a functional configuration of a data processing device according to a first embodiment. FIG. 2 is a diagram showing an example of a hardware configuration of a data processing device according to a first embodiment. FIG. 3 is a diagram showing an example of controlling a control target according to a first embodiment. FIG. 4 is a diagram showing an example of control procedure data according to a first embodiment. FIG. 5 is a diagram showing an example of a control program according to a first embodiment. FIG. 6 is a flowchart showing an example of an operation of a program management unit according to a first embodiment. FIG. 7 is a diagram showing an example of a part of a control program according to a first embodiment. FIG. 8 is a diagram showing an example of a part of a control program according to a first embodiment. FIG. 9 is a diagram showing an example of a control program according to a second embodiment. FIG. 10 is a diagram showing an example of a control program according to a second embodiment. FIG. 11 is a diagram showing an example of a control program according to a third embodiment. FIG. 12 is a flowchart showing an example of an operation of a program management unit according to a third embodiment. FIG. 13 is a diagram showing an example of control procedure data according to a fourth embodiment. FIG. 14 is a diagram showing an example of a control program according to a fourth embodiment. A flowchart showing an example of an operation of a program management unit according to a fourth embodiment. FIG. 15 is a diagram showing an example of a control program according to a fourth embodiment. A flowchart showing an example of an operation of a program management unit according to a fourth embodiment. FIG. 16 is a diagram showing an example of a control program using state transition notation. FIG. 17 is a diagram showing an example of a control program using event control notation.

[0012] Hereinafter, embodiments will be described with reference to the drawings. In the following description of the embodiments and the drawings, the same reference numerals denote the same or corresponding parts.

[0013] Embodiment 1. ***Description of Configuration*** Fig. 1 shows an example of the functional configuration of a data processing device 100 according to this embodiment. Fig. 2 shows an example of the hardware configuration of the data processing device 100 according to this embodiment. The operation procedure of the data processing device 100 corresponds to a data processing method. Furthermore, a program that realizes the operation of the data processing device 100 corresponds to a data processing program.

[0014] The data processing device 100 is a computer. As shown in FIG. 2 , the data processing device 100 includes, as hardware components, a processor 901, a main storage device 902, an auxiliary storage device 903, and a communication device. As shown in FIG. 1 , the data processing device 100 also includes, as functional components, a control procedure data acquisition unit 101, a program management unit 102, a display unit 103, and an operation unit 104. The functions of the control procedure data acquisition unit 101, the program management unit 102, the display unit 103, and the operation unit 104 are realized, for example, by programs. The auxiliary storage device 903 stores programs that realize the functions of the control procedure data acquisition unit 101, the program management unit 102, the display unit 103, and the operation unit 104. These programs are loaded from the auxiliary storage device 903 to the main storage device 902. The processor 901 then executes these programs to perform the operations of the control procedure data acquisition unit 101, the program management unit 102, the display unit 103, and the operation unit 104, which will be described later. FIG. 2 schematically shows a state in which the processor 901 is executing programs that realize the functions of the control procedure data acquisition unit 101, the program management unit 102, the display unit 103, and the operation unit 104.

[0015] 1, a control procedure data acquisition unit 101 acquires control procedure data 200. The control procedure data 200 is data in which a control procedure is described. The control procedure data 200 includes conditions 201 and control processes 202. Details of the control procedure data 200 will be described later. The process performed by the control procedure data acquisition unit 101 corresponds to a control procedure data acquisition process.

[0016] The program management unit 102 analyzes the control procedure data 200 and generates a control program 300. The control program 300 is a program that reflects the control procedure described in the control procedure data 200. The control program 300 includes a state determination block 301 and a control execution block 302. Details of the control program 300 will be described later. The program management unit 102 corresponds to a first partial program generation unit, a second partial program generation unit, and a program generation unit. Furthermore, the processing performed by the program management unit 102 corresponds to a first partial program generation process, a second partial program generation process, and a program generation process.

[0017] The display unit 103 displays various information to the user of the data processing device 100. The display unit 103 may also display the generated control program 300.

[0018] The operation unit 104 accepts operations from the user of the data processing device 100. The operation unit 104 corresponds to a command acquisition unit.

[0019] Next, the control procedure data 200 will be described. The control procedure data 200 is composed of conditions 201 and control operations 202. The control procedure data 200 includes a plurality of conditions 201 and a plurality of control operations 202, and the plurality of conditions 201 are ordered. Each control operation 202 is a process of substituting a variable value for a control variable, an arithmetic operation, or the like. A control variable is a variable to which a variable value for controlling a control object is assigned. The control variable is, for example, an output variable. Each control variable is associated with one of the plurality of conditions 201. A variable value corresponding to the success or failure of the associated condition is assigned to each control variable. In the control procedure data 200, a control procedure is described using these plurality of conditions 201 and a plurality of control operations 202 (substitution of variable values ​​for control variables). Unless otherwise specified below, the control variables are assumed to be output variables.

[0020] The control procedure data 200 will be described below using a specific example. Fig. 3 shows a control procedure for a pneumatic cylinder to be controlled. Fig. 4 shows an example of the control procedure data 200 in which the control procedure of Fig. 3 is described.

[0021] In the example of Figure 3, when the start button is pressed, the value of the condition variable X0 becomes ON. When the value of the condition variable X0 becomes ON, the value of the output variable Y10 becomes ON. When the value of the output variable Y10 becomes ON, the piston in the pneumatic cylinder moves forward at the instruction of the PLC. When the sensor X1 reacts to the tip of the piston, the value of the condition variable X1 becomes ON. When the value of the condition variable X1 becomes ON, the value of the output variable Y10 becomes OFF. When the value of the output variable Y10 becomes OFF, the piston stops moving forward at the instruction of the PLC. Next, the output variable Y11 becomes ON. When the output variable Y11 becomes ON, the piston moves backward at the instruction of the PLC. Then, when the sensor X2 reacts to the tip of the piston, the condition variable X2 becomes ON. When the condition variable X2 becomes ON, the value of the output variable Y11 becomes OFF. When the value of the output variable Y11 becomes OFF, the piston stops moving at the instruction of the PLC.

[0022] In the example of FIG. 4 , the control procedure is described in a flowchart format. In the example of FIG. 4 , the condition 201 is represented by a decision object (a diamond-shaped object). Furthermore, the control process 202 is represented by a process object (a rectangular object). The control procedure is indicated by connecting the objects with arrows. That is, in the example of FIG. 4 , each of "X0==ON," "X1==ON," and "X2==ON" shown in the decision object is a condition 201. Each of "X0," "X1," and "X2" included in the condition 201 is a condition variable. Each of "Y10=ON," "Y10=OFF," "Y11=ON," and "Y11=OFF" shown in the process object is a control process 202. Each of "Y10" and "Y11," to which a variable value (ON or OFF) is assigned in the control process 202, is an output variable.

[0023] In the example of FIG. 4, one processing object (step T4) describes that "Y10=OFF" is followed by "Y11=ON." Alternatively, "Y10=OFF" and "Y11=ON" may be described in separate processing objects, and these processing objects may be connected by an arrow. Similarly, multiple conditions connected by logical product (AND) may be described in one judgment object, or each condition may be described in a separate judgment object, and these judgment objects may be connected by an arrow. Alternatively, multiple conditions may be described in other ways.

[0024] The control procedure data 200 only needs to indicate the order of the conditions 201 and the control processes 202. Therefore, instead of a flowchart, the control procedure data 200 may be generated in a structured language such as XML (Extensible Markup Language). Furthermore, the control procedure data 200 may be generated in a table format such as a spreadsheet. In the example of FIG. 4 , the flowchart is generated using variables X0, Y10, etc., which indicate the input / output addresses of the PLC. However, the flowchart may be generated using an easily understandable name such as "sensor A." In this case, a description such as "sensor A == ON" is used instead of "X0 == ON." Alternatively, a correspondence table between names used in the flowchart and input / output addresses may be prepared separately, and the control program 300 may be generated by converting the names to input / output addresses using the correspondence table. If the software using the ladder language supports programs using variables, the control program 300 may be generated using a name such as "sensor A" as a variable name. In this case, a correspondence table between variable names and input / output addresses is also generated.

[0025] Next, the control program 300 shown in FIG. 1 will be described. The control program 300 is composed of a state determination block 301 and a control execution block 302. FIG. 5 shows an example of the control program 300 generated from the control procedure data 200 shown in FIG. 4. As explained in the explanation of FIG. 17, the state determination block 301 is a code block that stores in variables how sequential operations proceed one operation at a time in accordance with changes in state. The code blocks in the lines shown above the dashed line in FIG. 5 are each state determination blocks 301. Each state determination block 301 corresponds to a first partial program. Similarly, the control execution block 302 is a code block that switches output processing depending on each state, as explained in the explanation of FIG. 17. The code blocks in the lines shown below the dashed line in FIG. 5 are each control execution blocks 302. Each control execution block 302 corresponds to a second partial program.

[0026] ***Explanation of Operation*** An example of operation of the program management unit 102 according to this embodiment will be described with reference to Fig. 6. Below, an example of operation of the program management unit 102 will be described using an example of generating the control program 300 shown in Fig. 5 from the control procedure data 200 shown in Fig. 4. Fig. 6 shows the operation after the control procedure data acquisition unit 101 acquires the control procedure data 200 and outputs the acquired control procedure data 200 to the program management unit 102.

[0027] First, the program management unit 102 defines state variables corresponding to each condition, starting point, and end point (step S1). In the example of FIG. 5, the program management unit 102 defines a state variable M0 as the starting point. The program management unit 102 also defines a state variable M1 for the condition "X0==ON". The program management unit 102 also defines a state variable M2 for the condition "X1==ON". The program management unit 102 also defines a state variable M3 for the condition "X2==ON". The program management unit 102 also defines a state variable M4 as the end point. Note that the program management unit 102 may specify the variable names of the state variables in the order they are listed in the control procedure data 200 as described above, or the user of the data processing device 100 may specify the variable names of the state variables in the control procedure data 200, for example.

[0028] Next, the program management unit 102 generates a code block (hereinafter simply referred to as a block) for the starting point (step S2). Each code block generated from step S2 to step S6 (described later) corresponds to a state determination block 301 (first partial program). In the example of FIG. 5, the program management unit 102 generates a code block for the starting point in which the value of the state variable M0 for the starting point is OFF only when the value of the state variable M4 for the end point is ON, and the value of the state variable M0 is ON otherwise. By doing so, when the value of the state variable M4 is ON by the code block for the end point generated in step S6 (described later), the value of the state variable M0 is OFF. Then, the values ​​of the other state variables M1 to M4 are sequentially OFF. As a result, the processing returns to the initial state (the values ​​of all state variables are OFF). Note that in the example of FIG. 3, determining whether the piston is in its initial position is omitted as a determination of whether the start condition is met. Alternatively, the program management unit 102 may determine whether the piston is in its initial position by adding a state variable to the code block for the starting point to determine whether the piston is in its initial position. Alternatively, the program management unit 102 may generate a code block that determines whether the piston is in its initial position based on the first condition.

[0029] Next, the program management unit 102 determines whether there is a condition for which the state judgment block 301 has not been generated (step S3). If there is a condition for which the state judgment block 301 has not been generated (YES in step S3), the process proceeds to step S4. On the other hand, if the state judgment block 301 has been generated for all conditions (NO in step S3), the process proceeds to step S6.

[0030] In step S4, the program management unit 102 selects the next condition. More specifically, in step S4, which is immediately after step S2, the program management unit 102 selects the first condition in the control procedure data 200. On the other hand, if a state judgment block 301 has already been generated for any condition, the program management unit 102 selects the next condition in the control procedure data 200 for the condition for which the state judgment block 301 was previously generated. In this example, the program management unit 102 selects the condition "X0==ON", which is the first condition in the control procedure data 200 in FIG. 5.

[0031] Next, the program management unit 102 generates a block (state determination block 301) that determines the value of the state variable (M1) of the selected selection condition ("X0 == ON") according to the control procedure (step S5). Specifically, the program management unit 102 generates a code block that determines the value (ON / OFF) of the state variable (M1) of the selection condition based on whether the selection condition ("X0 == ON") is true or false, the value of the state variable (starting state variable M0) of the preceding condition in the order before the selection condition, the value of the state variable (M1) of the selection condition, and the condition that makes the state variable (M1) of the selection condition false. Here, the program management unit 102 uses only the condition in the order immediately before the selection condition as the preceding condition. The program management unit 102 may use a condition other than the immediately preceding condition, as well as the condition in the order immediately before the selection condition, as long as it is a condition in the order before the selection condition. The condition that makes the state variable of the selection condition false is a condition that makes the value of the state variable of the selection condition OFF. Also, assume that the condition for disabling the state variable of a selection condition is defined in the data processing device 100 or the control procedure data 200 as the condition for disabling the state variable of the immediately preceding condition being OFF. For this reason, in the example of FIG. 5 , the condition for disabling the state variable M1 is that the value of the state variable M0 is OFF. The program management unit 102 generates a block in which the value of the state variable M1 becomes ON when the immediately preceding value of the state variable M0 is ON and the condition "X0 == ON" is satisfied, and the value of the state variable M1 becomes OFF when the immediately preceding value of the state variable M0 is OFF. In ladder programming, when the condition on the left side is not satisfied, the variable on the right side becomes OFF. For this reason, the program management unit 102 also generates a self-holding program using the state variable M1 to keep the value of the state variable M1 ON even if the value of the condition variable X0 becomes OFF after the value of the state variable M1 becomes ON.

[0032] The program management unit 102 also performs steps S3 to S5 for the condition "X1==ON" and the condition "X2==ON" to generate a code block (state judgment block 301) that determines the values ​​of state variables M2 and M3. The above describes the generation of the state judgment block 301 for "X0==ON," which is the earliest condition in the control procedure data 200, so the starting state variable M0 is used as the state variable for the preceding condition. When generating the state judgment block 301 for the condition "X1==ON," the state variable M1 for the condition "X0==ON" is used as the state variable for the preceding condition. When generating the state judgment block 301 for the condition "X2==ON," the state variable M2 for the condition "X1==ON" is used as the state variable for the preceding condition.

[0033] In this embodiment, the state determination block 301 is shown for a simple condition such as "X0==ON." However, the program management unit 102 can also generate state determination blocks 301 for more complex conditions.

[0034] As a complex condition, for example, a condition involving a determination as to whether a timer has expired may be included in the control procedure data 200. When a condition involving a determination as to whether a timer has expired is a selection condition, the program management unit 102 generates a state determination block 301 that determines the value of a state variable of the selection condition based on the success or failure of the selection condition, which is based on the determination result as to whether the timer has expired, and the value of a state variable of a preceding condition.

[0035] Another complex condition may be one that involves a logical operation of multiple partial conditions and is included in the control procedure data 200. When a condition involving a logical operation of multiple partial conditions is a selection condition, the program management unit 102 generates a state determination block 301 that determines the value of a state variable of the selection condition based on the success or failure of the selection condition, which is based on the results of the logical operation of the multiple partial conditions, and the value of a state variable of a preceding condition. In this case, the program management unit 102 may generate a code block solely for determining the condition, and generate a state determination block 301 that determines the value of the state variable using the determination result in that code block. For example, assume that a condition involving a logical operation, "(X10==ON AND X11==OFF) OR D0>=10," is set instead of "X0==ON" in FIG. 4. In this case, the program management unit 102 generates a code block that determines whether the condition is met and assigns the determination result to variable M99, as shown in FIG. 7. The program management unit 102 then generates a state determination block 301 that determines the value of state variable M1 using the value of variable M99.

[0036] 6, once state determination blocks 301 have been generated for all conditions (NO in step S3), the program management unit 102 generates a code block (state determination block 301) for the end point (step S6). In the example of FIG. 5, the program management unit 102 generates a state determination block 301 in which the value of the end point state variable M4 becomes ON when the value of the immediately preceding state variable M3 becomes ON. When the value of state variable M4 becomes ON, the value of state variable M0 becomes OFF. As a result, the values ​​of state variables M1 to M4 also become OFF in sequence, and the process returns to the initial state (the values ​​of all state variables are OFF).

[0037] Next, the program management unit 102 generates a control execution block 302. During maintenance of manufacturing equipment, it is necessary to easily determine the cause of each output variable's current value. For this reason, code blocks that determine the values ​​of variable output variables (especially bit-type variables) are often written together for each output variable. For this reason, in the processing flow of FIG. 6 , the program management unit 102 generates a control execution block 302 for each output variable. However, since there are no clear rules for how to generate the control program 300, the program management unit 102 may generate code blocks (control execution blocks 302) that determine the values ​​of the output variables in the order in which they appear in the control procedure data 200.

[0038] 6, the program management unit 102 determines whether there are any output variables for which control execution blocks 302 have not been generated (step S7). If there are any output variables for which control execution blocks 302 have not been generated (YES in step S7), the process proceeds to step S8. On the other hand, if control execution blocks 302 have been generated for all output variables (NO in step S7), the process proceeds to step S10.

[0039] In step S8, the program management unit 102 selects the next output variable. More specifically, the program management unit 102 selects the next output variable in the control procedure data 200 after the output variable that was previously used to generate the control execution block 302.

[0040] Next, the program management unit 102 generates a code block (control execution block 302) that determines a value to be assigned to the selected selected output variable (step S9). More specifically, the program management unit 102 generates the control execution block 302 that determines a value to be assigned to the selected output variable based on the value of the state variable of the corresponding condition to which the selected output variable corresponds.

[0041] As a specific example, the operation of step S9 of the program management unit 102 when the output variable Y10 is selected in step S8 will be described. In FIG. 4 , the value of the output variable Y10 becomes ON when the corresponding condition "X0==ON" is satisfied (YES in step T1) (step T2). That is, the value of the output variable Y10 becomes ON when the value of the state variable M1 for the corresponding condition "X0==ON" is ON. Also in FIG. 4 , the value of the output variable Y10 becomes OFF when the corresponding condition "X1==ON" is satisfied (YES in step T3) (step T4). That is, the value of the output variable Y10 becomes OFF when the value of the state variable M2 for the corresponding condition "X1==ON" is ON. The program management unit 102 generates a control execution block 302 that reflects such a control procedure.

[0042] Next, the operation of step S9 of the program management unit 102 when the output variable Y11 is selected in step S8 will be described. In FIG. 4, the value of the output variable Y11 becomes ON when the corresponding condition "X1==ON" is satisfied (YES in step T3) (step T4). That is, the value of the output variable Y11 becomes ON when the value of the state variable M2 for the corresponding condition "X1==ON" is ON. Also in FIG. 4, the value of the output variable Y11 becomes OFF when the corresponding condition "X2==ON" is satisfied (YES in step T5) (step T6). That is, the value of the output variable Y11 becomes OFF when the value of the state variable M3 for the corresponding condition "X2==ON" is ON. The program management unit 102 generates a control execution block 302 that reflects such a control procedure.

[0043] When control execution blocks 302 are generated for all output variables (NO in step S7), the program management unit 102 combines all state judgment blocks 301 and control execution blocks 302 to generate a control program 300 that reflects the control procedures of the control procedure data 200 (step S10).

[0044] In the above example, the program management unit 102 generates a control execution block 302 in which the output variable is turned ON once and OFF once in step S9. The program management unit 102 can also generate a control execution block 302 in which the value of the output variable changes more frequently.

[0045] For example, suppose the control procedure data 200 contains two or more condition sets, each of which is a combination of two or more conditions, and two or more condition sets are associated with an output variable. Furthermore, suppose that the conditions included in each of the two or more condition sets are associated with the output variable as corresponding conditions. Here, such an output variable is referred to as a composite output variable. A composite output variable is an example of a composite control variable. In such a case, suppose that the composite output variable is selected as the selected output variable. For each condition set associated with the composite output variable, the program management unit 102 generates a control execution block 302 that determines a value to be assigned to the composite output variable based on a combination of the values ​​of the state variables of the corresponding conditions included in the condition set. Specifically, suppose that condition sets 1 to 3 are associated with the composite output variable Y1. Assume that condition set 1 includes condition 1 ("X1 == ON") and condition 2 ("X2 == OFF"). Assume that condition set 2 includes condition 3 ("X3 == ON") and condition 4 ("X4 == OFF"). Assume that condition set 3 includes condition 5 ("X5 == ON") and condition 6 ("X6 == OFF"). In this case, the program management unit 102 sets M1 as the state variable for condition 1 ("X1 == ON") and M2 as the state variable for condition 2 ("X2 == OFF"). The program management unit 102 also sets M3 as the state variable for condition 3 ("X3 == ON") and M4 as the state variable for condition 4 ("X4 == OFF"). The program management unit 102 also sets M5 as the state variable for condition 5 ("X5 == ON") and M6 as the state variable for condition 6 ("X6 == OFF"). In this case, as shown in FIG. 8 , the program management unit 102 generates a control execution block 302 for each condition set that determines a value to be assigned to the composite output variable Y1 based on a combination of the values ​​of the state variables of the corresponding conditions included in the condition set.

[0046] In addition, the program management unit 102 may generate a control execution block 302 that determines the value of an output variable that takes an integer value rather than a single-bit value. For example, suppose two or more conditions are associated as corresponding conditions, and the control procedure data 200 includes an output variable whose value, when the corresponding condition is met, varies for each corresponding condition. Here, such an output variable is referred to as a variable output variable. The variable output variable is an example of a variable control variable. In such a case, suppose the variable output variable is selected as the selected output variable. The program management unit 102 generates a control execution block 302 that varies the value to be assigned to the variable output variable based on the value of the state variable of the corresponding condition of the variable output variable. Specifically, suppose that a variable output variable D10 is associated with conditions 1 to 3. If condition 1 is met, a value of 10 is assigned to the variable output variable D10. If condition 2 is met, a value of 20 is assigned to the variable output variable D10. Furthermore, if condition 3 is met, a value of 30 is assigned to the variable output variable D10. In this case, the program management unit 102 sets a state variable M1 for condition 1, a state variable M2 for condition 2, and a state variable M3 for condition 3. The control procedure data acquisition unit 101 generates a control execution block 302 that assigns a value of 10 to the variable output variable D10 if the value of state variable M1 is ON, assigns a value of 20 to the variable output variable D10 if the value of state variable M2 is ON, and assigns a value of 30 to the variable output variable D10 if the value of state variable M3 is ON. The program management unit 102 generates a control execution block 302 that changes the value to be assigned to the variable output variable D10 for each state variable (represented by a MOV command in FIG. 9), for example, as shown in FIG.

[0047] Furthermore, in addition to simple value changes, a process that calls another code block, such as a function block, may be defined in the control procedure data 200. In such a case, the program management unit 102 generates a control execution block 302 that includes a control variable that calls the function block when a condition is met.

[0048] ***Explanation of Effects of the Embodiment*** According to this embodiment, a control program that reflects a control procedure can be generated using state transition notation, thereby reducing the number of development steps. In other words, in this embodiment, a program developer simply creates control procedure data that describes conditions and control processing depending on whether the conditions are met, and a control program that reflects the control procedure can be generated in a familiar format (state transition notation). Therefore, according to this embodiment, it is possible to reduce the number of development steps for a control program for manufacturing equipment while maintaining ease of maintenance of the manufacturing equipment.

[0049] Embodiment 2. In the first embodiment, an example of generating a control program 300 using the state transition notation is shown. In this embodiment, an example of generating a control program 300 using the event control notation is shown. In this embodiment, differences from the first embodiment are mainly explained. Note that matters not explained below are the same as those in the first embodiment.

[0050] Fig. 10 shows a control program 300 in the event control notation. Below, an example will be described in which the program management unit 102 executes the processing flow of Fig. 6 for the control procedure data 200 of Fig. 4 to generate the control program 300 shown in Fig. 10. Also, below, processing that differs from that of the first embodiment will be mainly described.

[0051] In step S5, the program management unit 102 generates a state determination block 301 that determines the value of the state variable of the selection condition based on whether the selection condition is successful, the value of the state variable of the preceding condition, and the value of the state variable of the condition that is later in order than the selection condition.

[0052] Here, the operation of the program management unit 102 in step S5 will be described in detail using an example of generating a state determination block 301 that determines the state variable for the selection condition "X0==ON." Here, it is assumed that the condition for disabling the state variable for a selection condition is defined in the control procedure data 200 as the condition for disabling the state variable for the condition immediately following the selection condition being ON. Therefore, the program management unit 102 generates a state determination block 301 in which the value of the state variable M1 for the selection condition "X0==ON" is OFF when the value of the state variable M2 for "X1==ON," the condition immediately following the selection condition "X0==ON," is ON. Note that the state variable M0 of the condition immediately preceding the selection condition "X0==ON" (starting point) is a condition for the value of the state variable M1 to be ON. However, unlike in the first embodiment (state transition notation), the program management unit 102 generates the state determination block 301 so that the state variable M0 does not become a condition for disabling the value of the state variable M1.

[0053] In step S2, when the values ​​of state variables M1 to M4 are not ON, i.e., in the initial state, the program management unit 102 generates a state determination block 301 in which the value of the starting state variable M0 becomes ON, and the value of state variable M0 becomes OFF when the state variable M1 of the immediately following condition becomes ON, similar to the processing in step S5. Note that in Figure 10, the determination processing for state variable M1 is described redundantly to simplify the state determination block 301. The program management unit 102 does not need to generate the unnecessary determination processing for the left-side state variable M1.

[0054] In the event control notation, if the value of the state variable for the next condition is ON, the value of the state variable for the previous condition is OFF. Therefore, if the selected output variable is a bit variable, the program management unit 102 generates a control execution block 302 in step S9 using only state variables whose bit variable values ​​are ON. In the example of FIG. 4, the value of output variable Y10 is ON only when the value of state variable M1 for the condition "X0 == ON" is ON. Also, the value of output variable Y11 is ON only when the value of state variable M2 for the condition "X1 == ON" is ON. As shown in FIG. 10, the program management unit 102 generates a control execution block 302 for output variable Y10 and a control execution block 302 for output variable Y11 so that this control procedure is reflected.

[0055] As described above, according to this embodiment, a control program that reflects a control procedure can be generated using the event control notation, thereby reducing the number of development steps.

[0056] In addition, in the first and second embodiments, an example has been described in which the program management unit 102 generates a control program in a ladder language. The program management unit 102 can also generate a control program in a language other than a ladder language. FIG. 11 shows an example of a control program 300 written in C language that the program management unit 102 generates by executing the process flow of FIG. 6 on the control procedure data 200 of FIG. 4. Note that FIG. 11 shows a code block that reflects only the condition 201 and control process 202 defined in the control procedure data 200. In other words, FIG. 11 omits the illustration of variable name definitions and the like.

[0057] The user of the data processing device 100 can specify the type of control program 300 (state determination block 301, control execution block 302) to be generated by the program management unit 102. That is, the user can specify whether the control program 300 will be generated in state transition notation, event control notation, C language, or the like. The user of the data processing device 100 inputs a command specifying the type of control program 300 to the operation unit 104, for example, via the input / output device 904. The operation unit 104 acquires the command and notifies the program management unit 102 of the type of control program 300. The program management unit 102 generates the control program 300 corresponding to the type notified by the operation unit 104. That is, when the user specifies state transition notation as the type of control program 300, the program management unit 102 generates the control program 300 using the method described in the first embodiment. On the other hand, when the user specifies event control notation as the type of control program 300, the program management unit 102 generates the control program 300 using the method described in the second embodiment.

[0058] The user can also make other selections, such as whether or not to set a condition that makes a state variable false. For example, the user inputs a command instructing such a selection into the operation unit 104. The user may also make such a selection in the control procedure data 200. An interface that enables such a selection may also be provided on the display unit 103. The program management unit 102 generates a control program 300 that matches the user's selection.

[0059] Third Embodiment Control programs that control manufacturing equipment are often required to be able to initialize the state, forcibly stop the operation of the manufacturing equipment, maintain variable values ​​when a problem occurs, and so on. For this reason, in this embodiment, the program management unit 102 generates a control program 300 that meets these requirements. In this embodiment, differences from the first embodiment will be mainly explained. Note that matters not explained below are the same as those in the first embodiment.

[0060] FIG. 12 shows an example of a control program 300 using the state transition notation according to this embodiment. Compared to FIG. 5, variables enclosed by dashed lines have been added in FIG. 12. Specifically, in FIG. 12, when the value of variable M100 becomes ON, all state variables are initialized. Also, in FIG. 12, when the value of variable M101 becomes OFF, the values ​​of all state variables are fixed and the progression of the state stops. Furthermore, when the value of variable M101 becomes OFF, the values ​​of output variables Y10 and Y11 are forcibly turned OFF, and the operation of the pistons stops.

[0061] Fig. 13 is a flowchart showing an example of the operation of the program management unit 102 when generating the control program 300 shown in Fig. 12. Steps S100, S21, S51, S61, and S91 differ from those shown in Fig. 6. These steps will be mainly described below.

[0062] In step S100, the program management unit 102 determines variables for initializing state variables and variables for fixing the values ​​of the state variables. In the example of FIG. 12, the program management unit 102 determines M100 as a variable for initialization (hereinafter referred to as an initialization variable). The program management unit 102 also determines M101 as a variable for fixing the values ​​of the state variables (hereinafter referred to as a fixed variable). The variable names of the initialization variables and the fixed variables may be assigned automatically by the program management unit 102, or may be specified in advance by the user, for example, in the control procedure data 200. In the example of FIG. 12, the values ​​of all state variables are uniformly fixed, so the program management unit 102 determines only one fixed variable. Alternatively, the program management unit 102 may determine multiple fixed variables to separate the ranges of fixation. For example, the user simultaneously specifies ranges in the control procedure data 200 in which variable values ​​are fixed. The program management unit 102 then determines a fixed variable for each range specified by the user.

[0063] In step S21, a block is generated as the starting block (state judgment block 301) in which the value of state variable M0 turns OFF when the value of initialization variable M100 turns ON. When the value of state variable M0 of the starting point turns OFF, the values ​​of state variables M1 to M4 turn OFF sequentially. As a result, all state variables are initialized. In addition, the program management unit 102 adds fixation variable M101 to the starting state judgment block 301 so that the value of state variable M0 does not turn ON when the value of state variable M0 is OFF and the value of fixation variable M101 is OFF. As a result, the value of state variable M0 does not turn ON when the value of fixation variable M101 is OFF. This makes it possible to maintain the state and stop the progress of control.

[0064] In step S51, the program management unit 102 generates a block (state determination block 301) that prevents the values ​​of the state variables M1 to M3 from becoming ON when the values ​​of the state variables M1 to M3 are OFF and the value of the fixed variable M101 is OFF, as in step S21.

[0065] Similarly, in step S61, the program management unit 102 generates a block (state determination block 301) that prevents the value of state variable M4 from becoming ON when the value of state variable M4 is OFF and the value of fixed variable M101 is OFF. Also, the program management unit 102 maintains the value of state variable M4 as ON when the values ​​of state variables M3 and M4 are both ON, so that other processing does not change.

[0066] In step S91, the program management unit 102 generates a block (control execution block 302) in which the values ​​of the output variables Y10 and Y11 are OFF when the value of the fixed variable M101 is OFF. This allows the piston to be stopped regardless of the state in which the value of the fixed variable M101 is OFF.

[0067] In the present embodiment, an example has been described in which the program management unit 102 generates a block in which the values ​​of all output variables are forcibly set to OFF when the value of the fixed variable M101 becomes OFF. Alternatively, the program management unit 102 may generate a control execution block 302 in which only the value of a specified output variable is forcibly set to OFF. In this case, the user specifies the target output variable, for example, in the control procedure data 200. The program management unit 102 then generates a control execution block 302 that forcibly sets to OFF the value of the output variable specified in the control procedure data 200. The program management unit 102 may also generate a control execution block 302 that switches an output variable whose value is forcibly set to OFF. In this case, the user specifies a switching condition for the output variable, for example, in the control procedure data 200. The program management unit 102 then generates a control execution block 302 that switches the output variable whose value is forcibly set to OFF in accordance with the switching condition. The program management unit 102 may also generate a control execution block 302 that forcibly changes the value of an output variable to a default value other than OFF. In this case, the user specifies the value of the output variable after the forcible change, for example, in the control procedure data 200. Then, the program management unit 102 generates a control execution block 302 that forcibly changes the value of the output variable to the value specified in the control procedure data 200.

[0068] Although the present embodiment has been described with reference to an example in which the program management unit 102 uses initialized variables and fixed variables, the program management unit 102 may use variables other than these. The program management unit 102 may always use such variables to generate the control program 300. Alternatively, the user may specify in the control procedure data 200 whether or not to use these variables, and the program management unit 102 may generate the control program 300 using the variables in accordance with the specification in the control procedure data 200.

[0069] As described above, according to this embodiment, it is possible to generate a control program that enables initialization of the state, forced stopping of the operation of manufacturing equipment, maintenance of the state of variables when a problem occurs, etc. As a result, it is possible to reduce the man-hours required for developing the control program.

[0070] Fourth Embodiment In controlling manufacturing equipment, control may be switched depending on conditions. In this embodiment, in consideration of such events, the program management unit 102 generates a control program 300 corresponding to control procedure data 200 in which branching and merging are defined. In this embodiment, differences from the first embodiment will be mainly explained. Note that matters not explained below are the same as those in the first embodiment.

[0071] FIG. 14 shows an example of control procedure data 200 including branch conditions and merge conditions. Steps T11 and T12 in FIG. 14 are the same as steps T1 and T2 in FIG. 4. In FIG. 14, if it is determined in step T13 that the conditions "X1==ON" and "X20==ON" are true, the value of output variable Y10 is set to OFF and the value of output variable Y11 is set to ON (step T14). On the other hand, if it is determined that the conditions "X1==ON" and "X20==OFF" are true, the value of output variable Y10 is set to OFF and the value of output variable Y12 is set to ON (step T15). Regardless of whether step T14 or step T15 is executed, if the condition "X2==ON" is true (YES in step T16), the values ​​of output variables Y11 and Y12 are set to OFF (step T17).

[0072] In FIG. 14, branching occurs due to "X1==ON&&X20==ON" and "X1==ON&&X20==OFF" in step T13, and these are branching conditions. In addition, the branches merge when the condition "X2==ON" in step 16 is met. Therefore, the condition "X2==ON" in step 16 is a merging condition. In addition, the multiple paths leading up to the merging of the branches generated by the branching conditions are called branch paths. In FIG. 14, the path from step T13 via step T14 to step T16 and the path from step T13 via step T15 to step T16 are both branching paths.

[0073] In FIG. 14 , the value of the output variable Y11 depends on whether the branch condition "X1==ON&& X20==ON" is satisfied in step T14. The value of the output variable Y11 also depends on whether the merge condition "X2==ON" is satisfied in step T17. Therefore, the branch condition "X1==ON&& X20==ON" and the merge condition "X2==ON" are the corresponding conditions of the output variable Y11. Similarly, the value of the output variable Y12 depends on whether the branch condition "X1==ON&& X20==OFF" is satisfied in step T15. The value of the output variable Y12 also depends on whether the merge condition "X2==ON" is satisfied in step T17. Therefore, the branch condition "X1==ON&& X20==OFF" and the merge condition "X2==ON" are the corresponding conditions of the output variable Y12. The output variables Y11 and Y12 correspond to a branch condition and a junction condition, respectively, and are composite output variables, which are examples of composite control variables.

[0074] On the other hand, the output variable Y10 corresponds to the branch condition "X1==ON&&X20==ON" or "X1==ON&&X20==OFF", but does not correspond to the merge condition "X2==ON". Therefore, the output variable Y10 does not correspond to the composite output variable.

[0075] FIG. 15 shows an example of a control program 300 in state transition notation generated from the control procedure data 200 shown in FIG.

[0076] The following describes the procedure by which the program management unit 102 generates the control program 300 shown in Fig. 15 from the control procedure data 200 shown in Fig. 14, with reference to Fig. 16. Steps S11, S52, and S92 in Fig. 15 are different from those in Fig. 6. These steps will be mainly described below.

[0077] In step S11, similar to step S1 in FIG. 6 , state variables are defined for each condition, starting point, and end point. In step S11, if the control procedure data 200 includes a branch condition, the program management unit 102 defines, for the branch condition, a state variable indicating whether the branch condition is met. Furthermore, if the control procedure data 200 includes a join condition, the program management unit 102 defines, for the join condition, a state variable indicating whether the join condition is met. In the example of FIG. 15 , the program management unit 102 defines a state variable M0 for the starting point. Furthermore, the program management unit 102 defines a state variable M1 for the condition "X0==ON". Furthermore, the program management unit 102 defines a state variable M2 for the branch condition "X1==ON&&X20==ON". Furthermore, the program management unit 102 defines a state variable M3 for the branch condition "X1==ON&&X20==OFF". The program management unit 102 also defines a state variable M4 for the joining condition "X2==ON." The program management unit 102 also defines a state variable M5 for the end point.

[0078] In step S52, if the selective condition is a branch condition, the program management unit 102 generates a code block (state judgment block 301) that determines the value of the state variable of the branch condition (referred to as a selected branch condition) that is the selective condition based on whether the selected branch condition is true or false, the value of the state variable of the preceding condition of the selected branch condition, and the values ​​of the state variables of the other branch conditions. More specifically, if the selected branch condition is true and the value of the state variable of the condition immediately preceding the selected branch condition is ON and the state variables of the other branch conditions are OFF, the program management unit 102 generates a state judgment block 301 in which the state variable of the selected branch condition is ON and the state variables of the other branch conditions are OFF when the selective branch condition is true and the value of the state variable of the condition immediately preceding the selected branch condition is ON. In other words, if the selective branch condition is true and the value of the state variable of the condition immediately preceding the selected branch condition is ON, the program management unit 102 generates a state judgment block 301 in which the state variable of the selected branch condition is ON and the state variables of the other branch conditions are OFF. 15, when the selective branching condition "X1==ON&&X20==ON" is satisfied, the value of state variable M1 of the immediately preceding condition is ON, and the value of state variable M3 of another branching condition "X1==ON&&X20==OFF" is OFF, the value of state variable M2 of the selective branching condition "X1==ON&&X20==ON" becomes ON. In other words, the program management unit 102 generates a state determination block 301 in which the value of state variable M3 does not become ON if the value of state variable M2 becomes ON first, and conversely, the value of state variable M2 does not become ON if the value of state variable M3 becomes ON first.

[0079] 15, the success / failure determination process for the state variable M1 of the immediately preceding condition is shared by the success / failure determination process for the state variable M2 and the success / failure determination process for the state variable M3. Alternatively, the program management unit 102 may generate a state determination block 301 that performs the success / failure determination process for the state variable M1 separately for the success / failure determination process for the state variable M2 and the success / failure determination process for the state variable M3.

[0080] Also, in step S52, if the selection condition is a merge condition, the program management unit 102 generates a code block (state determination block 301) that determines the value of the state variable of the merge condition based on whether the merge condition is met and the values ​​of the state variables of the conditions included in the multiple branch paths or the values ​​of the state variables of the multiple branch conditions. More specifically, the program management unit 102 generates the state determination block 301 in which the state variable of the merge condition is ON when the merge condition is met and the value of the state variable of any condition included in any of the multiple branch paths before the merge or the value of any state variable of the multiple branch conditions is ON. In FIG. 15 , when the merge condition "X2==ON" is met and the value of either the state variable M2 or the state variable M3 of the two branch conditions is ON, the value of the state variable M4 of the merge condition is ON. In the control procedure data 200 of FIG. 14, there are no conditions along any of the branch routes, so in FIG. 15, when the merging condition is met and the value of either the state variable M2 or the state variable M3 is ON, the value of the state variable M4 of the merging condition "X2==ON" becomes ON.

[0081] 14 shows an example in which multiple branch paths merge when a condition is met, but even when multiple branch paths merge in a control process, the program management unit 102 uses a similar procedure to generate the state determination block 301. For example, even in an example in which the control process "Y13=ON" is written between step T14, step T15, and step T16 in FIG. 14 and multiple branch paths merge at the control process "Y13=ON," the program management unit 102 uses a similar procedure to generate the state determination block 301.

[0082] In step S92, the program management unit 102 generates a code block (control execution block 302) that determines a value to be assigned to the selected output variable according to the control procedure, as in the first embodiment. In this embodiment, if the selected control variable is a composite output variable, the program management unit 102 generates a code block (control execution block 302) that determines a value to be assigned to the composite output variable based on the value of the state variable of the branch condition (corresponding condition of the composite output variable) and the value of the state variable of the junction condition (corresponding condition of the composite output variable). If the selected output variable is not a composite output variable, the program management unit 102 generates the control execution block 302 in the same manner as in the first embodiment.

[0083] In the example of FIG. 15 , the value of output variable Y10, which is not a composite output variable, is ON when state variable M1 of the condition "X0==ON" is ON. The value of output variable Y10 is OFF when either state variable M2 of the branch condition "X1==ON&& X20==ON" or state variable M3 of the branch condition "X1==ON&& X20==OFF" is ON. The value of output variable Y11, which is a composite output variable, is ON when state variable M2 of the branch condition "X1==ON&& X20==ON" is ON. The value of output variable Y11 is OFF when state variable M4 of the merge condition "X2==ON" is ON. The value of output variable Y12, which is a composite output variable, is ON when state variable M3 of the branch condition "X1==ON&& X20==OFF" is ON. Furthermore, the value of the output variable Y12 becomes OFF when the state variable M4 of the merging condition "X2==ON" is ON.

[0084] As described above, according to this embodiment, a control program can be generated from control procedure data in which branching and merging are defined, thereby reducing the number of steps required to develop the control program.

[0085] Although the first to fourth embodiments have been described above, two or more of these embodiments may be combined and implemented. Alternatively, one of these embodiments may be partially implemented. Alternatively, two or more of these embodiments may be partially combined and implemented. Furthermore, the configurations and procedures described in these embodiments may be modified as necessary.

[0086] ***Supplementary Explanation of Hardware Configuration*** Finally, a supplementary explanation of the hardware configuration of the data processing device 100 will be provided. The processor 901 shown in FIG. 2 is an IC (Integrated Circuit) that performs processing. The processor 901 is a CPU (Central Processing Unit), a DSP (Digital Signal Processor), or the like. The main storage device 902 shown in FIG. 2 is a RAM (Random Access Memory). The auxiliary storage device 903 shown in FIG. 2 is a ROM (Read Only Memory), a flash memory, a HDD (Hard Disk Drive), or the like. The input / output device 904 shown in FIG. 2 is a mouse, a keyboard, a display, or the like. Although not shown in FIG. 2, the data processing device 100 may also include a communication device. The communication device is an electronic circuit that executes data communication processing. The communication device is, for example, a communication chip or a NIC (Network Interface Card).

[0087] The auxiliary storage device 903 also stores an OS (Operating System). At least a portion of the OS is executed by the processor 901. While executing at least a portion of the OS, the processor 901 executes programs that realize the functions of the control procedure data acquisition unit 101, the program management unit 102, the display unit 103, and the operation unit 104. Task management, memory management, file management, communication control, etc. are performed by the processor 901 executing the OS. At least one of information, data, signal values, and variable values ​​indicating the results of processing by the control procedure data acquisition unit 101, the program management unit 102, the display unit 103, and the operation unit 104 is stored in at least one of the main storage device 902, the auxiliary storage device 903, and a register and cache memory in the processor 901. Furthermore, the programs that realize the functions of the control procedure data acquisition unit 101, the program management unit 102, the display unit 103, and the operation unit 104 may be stored on a portable recording medium such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a Blu-ray (registered trademark) disk, a DVD, etc. Then, the portable recording medium on which the programs that realize the functions of the control procedure data acquisition unit 101, the program management unit 102, the display unit 103, and the operation unit 104 are stored may be distributed.

[0088] Furthermore, the "unit" in at least one of the control procedure data acquisition unit 101, the program management unit 102, the display unit 103, and the operation unit 104 may be interpreted as a "circuit," a "step," a "procedure," a "process," or a "circuitry." Also, 10 may be realized by a processing circuit. The processing circuit is, for example, a logic IC (Integrated Circuit), a GA (Gate Array), an ASIC (Application Specific Integrated Circuit), or an FPGA (Field-Programmable Gate Array). In this case, the control procedure data acquisition unit 101, the program management unit 102, the display unit 103, and the operation unit 104 are each realized as part of a processing circuit. In this specification, the generic concept of a processor and a processing circuit is referred to as "processing circuitry." That is, a processor and a processing circuit are each specific examples of "processing circuitry."

[0089] 100 Data processing device, 101 Control procedure data acquisition unit, 102 Program management unit, 103 Display unit, 104 Operation unit, 200 Control procedure data, 201 Condition, 202 Control processing, 300 Control program, 301 Status determination block, 302 Control execution block, 901 Processor, 902 Main memory device, 903 Auxiliary memory device, 904 Input / output device.

Claims

1. A data processing device having: a control procedure data acquisition unit that acquires control procedure data in which a control procedure is described using a plurality of ordered conditions and a plurality of control variables, each of which is associated with one of the plurality of conditions and is assigned a value depending on whether the associated corresponding condition is satisfied; a first partial program generation unit that generates, according to the control procedure, a first partial program that sequentially selects each condition of the plurality of conditions and, for each selected condition, a selection condition, determines a value of a state variable of the selection condition based on whether the selection condition is satisfied and the value of a state variable of a preceding condition, which is a condition ordered earlier than the selection condition; a second partial program generation unit that generates, according to the control procedure, a second partial program that sequentially selects each control variable of the plurality of control variables and, for each selected control variable, a selection control variable, determines a value to be assigned to the selection control variable based on the value of the state variable of the corresponding condition of the selection control variable; and a program generation unit that generates a program in which the control procedure is reflected using the first partial program and the second partial program.

2. A data processing device as described in claim 1, wherein the first partial program generation unit generates a first partial program that determines the value of a state variable of the selection condition based on whether the selection condition is satisfied and the value of the state variable of the condition immediately preceding the selection condition.

3. A data processing device as described in claim 1, wherein the first partial program generation unit generates a state variable of a starting point of the control procedure, and when the earliest-ordered condition among the plurality of conditions is the selection condition, generates a first partial program that determines the value of the state variable of the earliest-ordered condition, which is the selection condition, based on the success or failure of the earliest-ordered condition, which is the selection condition, and the value of the state variable of the starting point.

4. A data processing device according to claim 3, wherein the first partial program generation unit generates a first partial program that generates state variables at an end point of the control procedure and determines values ​​of state variables at the start point based on values ​​of the state variables at the end point.

5. A data processing device as described in claim 1, wherein the first partial program generation unit generates a first partial program that determines the value of a state variable of the selection condition based on whether the selection condition is satisfied or not or based on the value of a state variable of the selection condition and the value of a state variable of the preceding condition.

6. A data processing device as described in claim 1, wherein the control procedure data acquisition unit acquires control procedure data in which a condition involving a logical operation of a plurality of partial conditions is included in the plurality of conditions, and the first partial program generation unit generates a first partial program that, when a condition involving a logical operation of the plurality of partial conditions is the selection condition, determines the value of a state variable of the selection condition based on the success or failure of the selection condition based on the result of the logical operation of the plurality of partial conditions and the value of a state variable of the preceding condition.

7. A data processing device as described in claim 1, wherein the control procedure data acquisition unit acquires control procedure data in which a condition involving a determination as to whether or not a timer has expired is included in the plurality of conditions, and when the condition involving a determination as to whether or not the timer has expired is the selection condition, generates a first partial program that determines the value of a state variable of the selection condition based on the success or failure of the selection condition based on the result of the determination as to whether or not the timer has expired and the value of a state variable of the preceding condition.

8. The data processing device of claim 1, wherein the control procedure data acquisition unit acquires control procedure data in which a composite control variable is included in the multiple control variables, to which two or more condition sets, each of which is a combination of two or more conditions, are associated, and a condition included in each of the two or more condition sets is associated as the corresponding condition, and the second partial program generation unit generates a second partial program that, when the composite control variable is the selected control variable, determines a value to be assigned to the composite control variable based on a combination of values ​​of state variables of the corresponding conditions included in the condition set, for each condition set associated with the composite control variable.

9. The data processing device of claim 1, wherein the control procedure data acquisition unit acquires control procedure data in which two or more conditions are associated as the corresponding conditions, and a variable control variable, which is a control variable whose value to be assigned when the corresponding condition is satisfied varies for each of the corresponding conditions, is included in the plurality of control variables; and the second partial program generation unit generates a second partial program in which, when the variable control variable is the selected control variable, the value to be assigned to the variable control variable varies based on the value of a state variable of the corresponding condition of the variable control variable.

10. A data processing device as described in claim 1, wherein the first partial program generation unit generates a first partial program that determines the value of the state variable of the selection condition based on whether the selection condition is satisfied, the value of the state variable of the preceding condition, and the value of the state variable of a condition that is later in sequence than the selection condition.

11. A data processing device as described in claim 10, wherein the first partial program generation unit generates a first partial program that determines the value of the state variable of the selection condition based on whether the selection condition is satisfied, the value of the state variable of the preceding condition, and the value of the state variable of the condition immediately following the selection condition.

12. The data processing device according to claim 1, wherein said first partial program generating section generates a first partial program that initializes all state variables of said plurality of conditions.

13. A data processing device according to claim 1, wherein the first partial program generation unit generates a first partial program that fixes the values ​​of all state variables of the plurality of conditions or the value of a specified state variable among the state variables of the plurality of conditions.

14. A data processing device according to claim 1, wherein the second partial program generation unit generates a second partial program that sets all values ​​of the plurality of control variables or the value of a specified control variable among the plurality of control variables to a default value.

15. A data processing device as described in claim 14, wherein the second partial program generation unit generates a second partial program that switches the control variable to be set to the default value when generating a second partial program that sets the value of a specified control variable among the multiple control variables to a default value.

16. The control procedure data acquisition unit acquires control procedure data in which a plurality of branch conditions under which a plurality of branch paths occur and a join condition under which the plurality of branch paths join are included in the plurality of conditions, and a composite control variable which is a control variable to which any of the branch conditions and the join condition are associated as the corresponding condition is included in the plurality of control variables; the first partial program generation unit generates a first partial program for determining a value of a state variable of the branch condition which is a selection condition, based on whether or not the branch condition which is the selection condition is satisfied, a value of a state variable of the preceding condition of the branch condition which is the selection condition, and a value of a state variable of a branch condition other than the branch condition which is the selection condition, when any of the branch conditions is the selection condition, based on whether or not the join condition which is the selection condition is satisfied, and a value of a state variable of a condition included in the plurality of branch paths or a value of a state variable of the plurality of branch conditions, when the join condition is the selection condition; and the second partial program generation unit generates 2. A data processing apparatus according to claim 1, further comprising: a first program for determining a value to be assigned to the composite control variable, which is the selected control variable, based on a value of a state variable of a branch condition, which is the corresponding condition of the composite control variable, which is the selected control variable, and a value of a state variable of the join condition, when the composite control variable is the selected control variable.

17. The data processing device according to claim 1, further comprising a command acquisition unit that acquires a command specifying a program type of the first partial program and the second partial program, the first partial program generation unit that generates a first partial program that conforms to the program type specified in the command, and the second partial program generation unit that generates a second partial program that conforms to the program type specified in the command.

18. A data processing method in which a computer acquires control procedure data in which a control procedure is described using a plurality of ordered conditions and a plurality of control variables, each of which is associated with one of the plurality of conditions and is assigned a value depending on whether the associated corresponding condition is satisfied or not; the computer generates, according to the control procedure, a first partial program in which the computer sequentially selects each of the plurality of conditions and, for each selected condition, a selection condition, determines the value of a state variable of the selection condition based on whether the selection condition is satisfied or not and the value of a state variable of a preceding condition, which is a condition ordered earlier than the selection condition; the computer generates, according to the control procedure, a second partial program in which the computer sequentially selects each control variable of the plurality of control variables and, for each selected control variable, a selection control variable, determines a value to be assigned to the selection control variable based on the value of the state variable of the corresponding condition of the selection control variable; and the computer generates a program in which the control procedure is reflected using the first partial program and the second partial program.

19. A data processing program that causes a computer to execute the following steps: a control procedure data acquisition process for acquiring control procedure data in which a control procedure is described using a plurality of ordered conditions and a plurality of control variables, each of which is associated with one of the plurality of conditions and is assigned a value depending on whether the associated corresponding condition is satisfied; a first partial program generation process for generating, according to the control procedure, a first partial program that sequentially selects each of the plurality of conditions and, for each selected condition, a selection condition, determines a value of a state variable of the selection condition based on whether the selection condition is satisfied and the value of a state variable of a preceding condition, which is a condition ordered earlier than the selection condition; a second partial program generation process for generating, according to the control procedure, a second partial program that sequentially selects each control variable of the plurality of control variables and, for each selected control variable, a selection control variable, determines a value to be assigned to the selection control variable based on the value of the state variable of the corresponding condition of the selection control variable; and a program generation process for generating a program in which the control procedure is reflected using the first partial program and the second partial program.

Citation Information

Patent Citations

  • Programmable logic controller and control method

    JP2004265060A

  • Sequence control program generation apparatus

    JP2005222484A

  • Sequence controller, program creation apparatus, and interpreter execution engine

    JP2011039612A