This application is a 371 application of the International PCT application serial no. PCT/JP2019/005779, filed on Feb. 18, 2019, which claims the priority benefit of Japan Patent Application No. 2018-046575, filed on Mar. 14, 2018. The entirety of each of the abovementioned patent applications is hereby incorporated by reference herein and made a part of this specification.
The present invention relates to a technology for assisting with generation and editing of a ladder diagram program executed by a programmable controller (PLC).
In the related art, ladder diagram programs executed by programmable controllers (PLCs) are generated by general-purpose computers such as personal computers and are uploaded to the PLCs in many cases. In general-purpose computers, programs that perform a generation and editing function of generating and editing a ladder diagram program, an upload function of uploading the ladder diagram program to PLCs, a download function of downloading the ladder diagram program from PLCs, and the like are installed.
As a device assisting with generation of a ladder diagram program, there is a device disclosed in, for example, Patent Literature 1. Patent Literature 1 facilitates an input of a variable name described as an operand of a command. In particular, when a plurality of variables has variable names differentiated by suffixing numbers, signs, or the like to the same character strings, an input of variable names is facilitated.
Specifically, in Patent Literature 1 (Japanese Patent Application Laid-Open No. 2010-238225), when one character of a character string that forms a variable name is input, all the variable names whose prefix matches character strings (confirmed character strings) confirmed by then and character strings formed by the one character presently input are extracted from a variable table. In Patent Literature 1, when the number of extracted variable names is single, the variable name is confirmed as an operand. When the number of extracted variable names is plural, character strings of portions whose prefixes match all the extracted variable names are set as confirmed character strings. In Patent Literature 1, an input of one character subsequent to the confirmed character string is received again and the foregoing operation is repeated.
An input of a variable name described as an operand of a command is facilitated in Patent Literature 1. However, an improvement in efficiency of generation and editing jobs of the ladder diagram program in which the same ladder circuit or similar ladder circuits appear repeatedly is not realized. More specifically, an operator may not simply perform an operation of inputting the same ladder circuit or similar ladder circuits appearing repeatedly in the ladder diagram program which is being generated and edited.
The ladder circuits mentioned here are circuits that have a logical meaning and are function blocks (FB), contacts, or the like. The similar ladder circuits are circuits that have the same logical meaning and different input variables.
In generation of a ladder diagram program, an operation of repeatedly inputting the same partial circuit or similar partial circuits is a monotonous and cumbersome operation for an operator and it is easy to cause an input mistake.
An objective of the invention is to provide a technology for improving generation and editing efficiency of a ladder diagram program in which the same ladder circuit or similar ladder circuits repeatedly appear.
A ladder diagram program generation assistance device according to the invention is configured as follows to achieve the objective of the invention.
An input unit receives an input related to generation and editing of a ladder diagram program. A partial circuit search unit, when the input unit receives a command name of the ladder circuit to be inserted into the ladder diagram program, searches for and extracts a partial circuit corresponding to a ladder circuit with the received command name. For example, the partial circuit search unit extracts a partial circuit including a ladder circuit that has a command name which is the same as the input command name. The partial circuit mentioned here may be a single ladder circuit that has a logical meaning or may include a plurality of ladder circuits that have a logical meaning.
An input candidate output unit outputs an input candidate corresponding to the partial circuit extracted by the partial circuit search unit. A replacement processing unit when a selection of the input candidate output by the input candidate output unit is received, replaces, with the selected input candidate, the ladder circuit of which the command name has been input by the input unit.
Therefore, an operator can perform an operation of inputting the same ladder circuit or similar ladder circuits appearing repeatedly by performing a simple operation of inputting the command name of the ladder circuit and selecting the output input candidate in the generated and edited ladder diagram program. Accordingly, it is possible to improve efficiency of generation and editing of the ladder diagram program in which the same ladder circuit or similar ladder circuits appear repeatedly.
The partial circuit search unit may search for a ladder circuit that has a command name which is the same as the command name input in the input unit and repeatedly appears a predetermined number of times or more in the ladder diagram program which is being generated or edited, and extracts a partial circuit in accordance with the searched ladder circuit. In this configuration, it is possible to improve precision with which the input candidate to be output is a partial circuit including a ladder circuit of which a command name is input by the operation.
A variable setting unit that sets a variable of the partial circuit extracted by the partial circuit search unit may be included and the input candidate output unit may output the partial circuit in which the variable is set by the variable setting unit as an input candidate. For example, the variable setting unit may set the variable of the partial circuit extracted by the partial circuit search unit in accordance with the variable of the ladder circuit that has a command name which is the same as the command name input in the input unit and appears repeatedly a plurality number of times in the ladder diagram program which is being generated or edited.
In this configuration, since labor taken to set a variable can be reduced, it is possible to further improve efficiency of generation and editing of the ladder diagram program in which the same ladder circuit or similar ladder circuits appear repeatedly.
The partial circuit search unit may also search for and extract a partial circuit corresponding to a ladder circuit with an input variable name when the input unit receives a variable name of the ladder circuit to be inserted into the ladder diagram program. The input candidate output unit outputs an input candidate corresponding to the partial circuit extracted by the partial circuit search unit. The replacement processing unit replaces, with the selected input candidate, the ladder circuit of which the variable name has been input when a selection of the input candidate output by the input candidate output unit is received. In this configuration, it is also possible to improve efficiency of generation and editing of the ladder diagram program in which the same ladder circuit or similar ladder circuits appear repeatedly.
According to the invention, it is possible to improve generation and editing efficiency of the ladder diagram program in which the same ladder circuit or similar ladder circuits repeatedly appear.
Hereinafter, a ladder diagram program generation assistance device according to an embodiment of the invention will be described.
The control unit 2 controls an operation of each unit of the body of the ladder diagram program generation assistance device 1.
The input operation unit 3 includes an input device such as a keyboard or a mouse and receives an input in response to an operation on the input device by the operator. The input operation unit 3 is equivalent to an input unit mentioned in the invention.
The display unit 4 includes a display device such as a display and controls screen display in the display device. The display unit 4 causes the display to display a state or the like of the ladder diagram program generated and edited at that time or the body of the ladder diagram program generation assistance device 1 at that time. The display unit 4 is equivalent to an input candidate output unit mentioned in the invention.
The storage unit 5 includes a storage medium such as a hard disk or a memory and stores a program necessary for an operation of the body of the ladder diagram program generation assistance device 1, data, and a ladder diagram program.
The input and output unit 6 performs input and output of the ladder diagram program (upload or download of the ladder diagram program) to and from a programmable controller (PLC) (not illustrated).
The partial circuit search unit 21 searches for a partial circuit corresponding to a command name of a function block (FB) for a ladder circuit input to the ladder diagram program 20 processed at a time when the operator operates the input operation unit 3. The ladder circuit mentioned here is a circuit that has a logical meaning and includes not only an FB but also a circuit element such as a contact. The partial circuit mentioned here may be a single ladder circuit that has a logical meaning or may include a plurality of ladder circuits that have a logical meaning.
The partial circuit search unit 21 searches for a partial circuit in the ladder diagram program 20 processed at that time (the partial circuit search unit 21 does not search for a partial circuit with regard to another ladder diagram program stored in the storage unit 5 or the like). The partial circuit search unit 21 searches for an FB that has a command name which is the same as the input command name in the ladder diagram program 20 processed at that time and extracts a partial circuit including the FB. In this example, the partial circuit search unit 21 searches for an FB that has a command name which is the same as the input command name in the ladder diagram program 20 processed at that time and that has already appeared a predetermined number of times (for example, a plurality of times such as twice or three times) or more in the ladder diagram program 20.
The variable setting unit 22 sets a variable in the partial circuit extracted by the partial circuit search unit 21. The variable setting unit 22 sets variables in a partial circuit presently extracted by the partial circuit search unit 21 in accordance with variables of a plurality of partial circuits searched for by the partial circuit search unit 21. For example, when the variables of the plurality of partial circuits searched for by the partial circuit search unit 21 are constant, the variable setting unit 22 sets variables with the same value. When the variables of the plurality of partial circuits searched for by the partial circuit search unit 21 are regularly changed, the variable setting unit 22 estimates and sets variables on the basis of this rule. When the variable is a structure, the variable setting unit 22 sets model-matched variables which are estimated based on the variables of the plurality of partial circuits searched for by the partial circuit search unit 21. When the variables have variable names in which signs such as numerals are suffixed to the variables, the variable setting unit 22 estimates and sets signs of the suffixes based on the variables of the plurality of partial circuits searched for by the partial circuit search unit 21. A partial circuit in which the variables are set by the variable setting unit 22 is output as an input candidate. Specifically, the display unit 4 displays the partial circuit in which the variables are set by the variable setting unit 22 as an input candidate on the display device.
When the output input candidate is selected, the replacement processing unit 23 replaces the FB to which the current command name is input in the ladder diagram program 20 processed at that time with the selected input candidate (the partial circuit in which the variables are set by the variable setting unit 22).
Hereinafter, an operation of the ladder diagram program generation assistance device 1 according to the example will be described.
In the ladder diagram program generation assistance device 1, when an input of a command name of an FB related to a ladder circuit to be inserted into the ladder diagram program 20 generated and edited at that time is received (s1), the partial circuit search unit 21 searches for and extracts partial circuits (s2). A search range in which the partial circuit search unit 21 searches for the partial circuits is a range from the first row of the ladder diagram program 20 generated and edited at that time to a row in which the FBs with the presently input command name are added. The partial circuit search unit 21 searches for the FBs that have a command name which is the same as the presently input command name and that have already appeared repeatedly a predetermined number of times (for example, a plurality of times such as twice or three times) or more in the search range of the ladder diagram program 20. When the partial circuit search unit 21 cannot search for the FBs satisfying the foregoing condition, the partial circuit search unit 21 determines that there are no partial circuits corresponding to the FBs with the presently input command name.
When the partial circuit search unit 21 can search for the FBs satisfying the foregoing condition and other ladder circuits connected to the FBs are common between the searched FBs, the partial circuit search unit 21 extracts a circuit formed by the searched FBs and the other common ladder circuits as a partial circuit. In other words, when the partial circuit search unit 21 can search for the FBs satisfying the condition and other ladder circuits connected to the FBs are not common between the searched FBs, the partial circuit search unit 21 extracts the searched FB as a partial circuit.
In the ladder diagram program generation assistance device 1, when the partial circuits cannot be extracted in s2, an input of variables or the like related to the FB with the currently input command name is received (s3 and s8) and the process return to s1.
In the ladder diagram program generation assistance device 1, when the partial circuits can be extracted in s2, the variable setting unit 22 sets variables for the extracted partial circuits (s3 and s4). In s4, the variable setting unit 22 sets variables of the partial circuits which are presently input candidates in accordance with the variables of the ladder circuits searched for in s2, that is, the partial circuits (the partial circuits extracted in s2) including the FBs that have the same command name and have already appeared in the ladder diagram program 20 generated and edited at that time. For example, when the variables of the plurality of partial circuits searched for by the partial circuit search unit 21 are constant, the variable setting unit 22 sets the variables of the partial circuits which are the presently input candidates to the same value. When the variables of the plurality of partial circuits searched for by the partial circuit search unit 21 are regularly changed, the variable setting unit 22 estimates and sets the variables of the partial circuits which are the presently input candidates based on this rule. When the variables are structures, the variable setting unit 22 sets the variables of the partial circuits which are the present input candidates to model-matched variables which are estimated based on the variables of the plurality of partial circuits searched for by the partial circuit search unit 21. When the variables have variable names in which signs such as numerals are suffixed to the variables, the variable setting unit 22 sets the variables of the partial circuits which are the present input candidates by estimating signs of the suffixes based on the variables of the plurality of partial circuits searched for by the partial circuit search unit 21.
Accordingly, as the number of partial circuits extracted in s2 is larger, setting precision of the variables in s4 is better.
The ladder diagram program generation assistance device 1 outputs the partial circuits with the variables set in s4 as input candidates (s5). The display unit 4 displays the input candidates on the display device. When the input candidates displayed on the display device are desired partial circuits, the operator performs an operation of selecting an input candidate in the input operation unit 3. In the ladder diagram program generation assistance device 1, when the input candidate is selected, the replacement processing unit 23 replaces the FB with the currently input command name with the partial circuit which is the selected input candidate (s6 and s7) and the process returns to s1.
When the operator performs an operation related to an input of the variables or the like to the FBs with the currently input command name without selecting the input candidate, the ladder diagram program generation assistance device 1 receives the operation by the operator (s6 and s8) and the process returns to s1. In s8, setting of the variables or the like is performed in response to the input operation by the operator.
In this way, in the ladder diagram program generation assistance device 1 according to the example, the operator can perform an operation of inputting the same ladder circuit (the ladder circuit including the FB) or similar ladder circuits (the ladder circuits including the FBs) appearing repeatedly by performing a simple operation of inputting the command names of the FBs and selecting the output input candidate in the generated and edited ladder diagram program. Accordingly, it is possible to improve efficiency of generation and editing of the ladder diagram program in which the same ladder circuit (the ladder circuit including the FB) or similar ladder circuits (the ladder circuits including the FBs) appear repeatedly.
Since the variables are automatically set, it is possible to further improve efficiency of generation of the ladder diagram program in which the same partial circuit (the ladder circuit including the FB) appears repeatedly.
Hereinafter, the process illustrated in
(A) of
As illustrated in (A) of
Y illustrated in (A) and (B) of
Then, when the operator performs an input operation of selecting the input candidate displayed on the display device, as illustrated in
As illustrated in
Then, when the operator performs an input operation of selecting the input candidate displayed on the display device, as illustrated in
A1 and A2 illustrated in
(A) of
As illustrated in (A) of
Then, when the operator performs an input operation of selecting the input candidate displayed on the display device, as illustrated in
(A) of
As illustrated in (A) of
The input variables of the partial circuit which is the input candidate are estimated to be [x, Y3] since input variables of two ladder circuits that have the command name EQ and have already appeared are [x, Y1] and [x, Y2]. A coil of the partial circuit which is the input candidate is estimated to be A3 since the coils connected to the contact circuits in which three contacts a, b, and c are connected in parallel are A1 and A2.
Then, when the operator performs an input operation of selecting the input candidate displayed on the display device, as illustrated in
In the foregoing example, the number of partial circuits outputted as input candidates is 1, but the number of partial circuits output as input candidates may be 2 or more.
Another example will be described. In the foregoing example, when the command name of the FBs is input, the FBs that have a command name which is the same as the presently input command name and that have already appeared a predetermined number of times or more in the range from the first row of the ladder diagram program 20 generated and edited at that time to the row in which the FB with the presently input command name is added are searched for to extract the partial circuit. In the other example, when a variable name of a contact, a coil, or the like which is a circuit element of a ladder circuit is input, circuit elements that have a variable name which is the same as the presently input variable name and that have already appeared repeatedly a predetermined number of times or more in a range from the first row of the ladder diagram program 20 generated and edited at that time to a row in which the circuit element with the presently input variable name is added are searched for to extract a partial circuit. The ladder diagram program generation assistance device 1 according to this example differs from the ladder diagram program generation assistance device according to the foregoing example in that the variable setting unit 22 is not included (the other configurations are the same as the configurations of the foregoing example).
When the partial circuit search unit 21 can search for the circuit elements satisfying the foregoing condition and other ladder circuits connected to the circuit elements are common between the searched circuit elements, the partial circuit search unit 21 extracts a circuit formed by the searched circuit elements and the other common ladder circuits as a partial circuit. When the circuit elements satisfying the condition can be searched for and the other ladder circuits connected to the circuit elements are not common between the searched circuit elements, the partial circuit search unit 21 according to the example determines that there are no partial circuits corresponding to the circuit elements with the presently input variable name.
In the ladder diagram program generation assistance device 1, when the partial circuits may not be extracted (when it is determined that there are no partial circuits), an input of the ladder circuits or the like connected to the circuit elements with the currently input variable name is received (s13 and s17) and the process return to s11.
In the ladder diagram program generation assistance device 1, when the partial circuits can be extracted, the extracted partial circuits are outputs as input candidates (s13 and s14). The display unit 4 displays the input candidates on the display device. When the input candidates displayed on the display device are desired partial circuits, the operator performs an operation of selecting an input candidate in the input operation unit 3. In the ladder diagram program generation assistance device 1, when the input candidate is selected, the replacement processing unit 23 replaces the circuit element with the currently input variable name with the partial circuit which is the selected input candidate (s15 and s16) and the process returns to s11.
When the operator performs an operation related to an input of the ladder circuits or the like connected to the circuit elements with the currently input variable name without selecting the input candidate, the ladder diagram program generation assistance device 1 receives the operation by the operator (s15 and s17) and the process returns to s1. In s17, the ladder circuits or the like in response to the input operation of the operator are connected to the circuit elements with the presently input variable name.
In this way, in the ladder diagram program generation assistance device 1 according to the example, when a ladder circuit formed by a plurality of circuit elements (a ladder circuit including no FBs) appears repeatedly as a partial circuit in the generated an edited ladder diagram program, the operator can perform an input operation related to the partial circuit by performing a simple operation of inputting the variable name of one circuit element belonging to the partial circuit and selecting the output input candidate (the partial circuit). Accordingly, it is possible to improve efficiency of generation and editing of the ladder diagram program in which the partial circuit formed by the plurality of circuit elements appears repeatedly.
(A) of
As illustrated in (A) of
Then, when the operator performs an input operation of selecting the input candidate displayed on the display device, as illustrated in (C) of
In this example, the number of partial circuits outputted as input candidates is not limited to 1, but two or more partial circuits may be output.
Number | Date | Country | Kind |
---|---|---|---|
JP2018-046575 | Mar 2018 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2019/005779 | 2/18/2019 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2019/176451 | 9/19/2019 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
20090005884 | Ikegami | Jan 2009 | A1 |
20090007000 | Hasegawa | Jan 2009 | A1 |
20110295388 | Iwata | Dec 2011 | A1 |
20150094829 | Iwatsu | Apr 2015 | A1 |
20160004242 | Yamaoka et al. | Jan 2016 | A1 |
20160034259 | Yamaoka | Feb 2016 | A1 |
20180095447 | Nagao | Apr 2018 | A1 |
Number | Date | Country |
---|---|---|
2003084813 | Mar 2003 | JP |
2007272679 | Oct 2007 | JP |
2010-238225 | Oct 2010 | JP |
5726387 | May 2015 | JP |
Entry |
---|
“International Search Report (Form PCT/ISA/210)” of PCT/JP2019/005779, dated May 21, 2019, with English translation thereof, pp. 1-2. |
“Written Opinion of the International Searching Authority (Form PCT/ISA/237)” of PCT/JP2019/005779, dated May 21, 2019, with English translation thereof, pp. 1-6. |
“Search Report of Europe Counterpart Application”, dated Nov. 30, 2021, p. 1-p. 7. |
Number | Date | Country | |
---|---|---|---|
20200225634 A1 | Jul 2020 | US |