WO2020031903A1 - サポート装置およびサポートプログラム - Google Patents

サポート装置およびサポートプログラム Download PDF

Info

Publication number
WO2020031903A1
WO2020031903A1 PCT/JP2019/030537 JP2019030537W WO2020031903A1 WO 2020031903 A1 WO2020031903 A1 WO 2020031903A1 JP 2019030537 W JP2019030537 W JP 2019030537W WO 2020031903 A1 WO2020031903 A1 WO 2020031903A1
Authority
WO
WIPO (PCT)
Prior art keywords
contact
type
logic circuit
circuit
program
Prior art date
Application number
PCT/JP2019/030537
Other languages
English (en)
French (fr)
Inventor
千瑛子 佐藤
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2020031903A1 publication Critical patent/WO2020031903A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts

Definitions

  • the present disclosure relates to a support device that supports creation of a control program executed by a control device that controls a control target, and a support program for realizing the support device.
  • Control devices such as PLCs (Programmable Logic Controllers) have been introduced in various manufacturing sites.
  • a control device is a kind of computer, and executes a user program designed according to a manufacturing device or a manufacturing facility.
  • Such a user program is created in a development environment prepared separately from the control device.
  • a device that provides a development environment and provides a function of uploading a user program to the control device or downloading a user program to the control device is also referred to as a support device.
  • the user program executed by the control device is described in a ladder language specified by IEC61131-3 or the like, for example, by a ladder logic circuit (logic circuit) or an instruction code of an operation represented by a combination of ladder logic circuits. Program ".
  • Ladder programs are represented by ladder diagrams.
  • the ladder diagram has a configuration in which a logic circuit expressed by a combination of contacts, coils, and the like is drawn in a ladder shape.
  • the coil indicates the output destination of the result of the logical operation combining the contacts.
  • the ladder diagram may be drawn in a hierarchical expression such that one logic circuit receives the result of another logic circuit, and another logic circuit receives the result of another logic circuit. . In such a case, there is a problem that it is difficult to identify the cause of the inoperability of the created logic circuit because one logic circuit is expressed in multiple layers.
  • Patent Literature 1 discloses a method in which a nearest branch circuit located before a ladder circuit to be checked is located for the purpose of easily finding the cause of a failure of a ladder circuit as a logic circuit.
  • a device for searching and extracting a branch circuit to be displayed from a ladder program based on the type of the searched branch circuit and displaying the extracted branch circuit is disclosed.
  • Patent Literature 1 displays each extracted branch circuit separately, and does not become a single connected logic circuit. Therefore, the entire logic operation for obtaining an output result of one logic circuit is performed. There remains a problem that the image is difficult to understand, in other words, the relationship between the output result and the actual input signal is difficult to understand.
  • One object of the present disclosure is to provide a development environment in which the relationship between an output result and an actual input signal can be easily understood.
  • a support device that supports creation of a ladder program executed by a control device that controls a control target.
  • the support device includes a program display unit that displays the ladder program by a logic circuit in which a plurality of types of elements are combined; All first-type contacts included in the logic circuit including the contacts are subjected to a logical operation for obtaining an operation result indicated by the first-type contacts by a second-type contact indicating a signal input from outside. Expanding means for expanding into a combined logic circuit.
  • the logic circuit including the first type of contact can be represented by a combination of the second type of contact. Therefore, the relationship between the output result of the logic circuit and the signal actually input from the outside is obtained. Can be displayed clearly.
  • the support device may further include an output unit that receives the execution result of the ladder program and outputs a conduction state of a logic circuit indicating the ladder program.
  • the cause of the ladder program not functioning can be easily specified from the conduction state of the logic circuit.
  • the logic circuit can be represented only by the second type of contact, the direct cause of the failure of the ladder program can be more easily specified.
  • the program display means for a logic circuit obtained by combining the second type of contacts obtained by the developing means, includes a conductive contact and a non-conductive contact connected to the conductive contact.
  • the display may be such that the elements located between the non-conductive contact connected to the conductive contact and the coil indicating the output result are not displayed.
  • the first type of contact receives the first type of contact when the first type of contact is a b-contact that becomes conductive upon receiving a false operation result.
  • the logical operation for obtaining the operation result indicated by the first type of contact can be expanded to a logical circuit combining the second type of contact. Good.
  • a logic circuit that is difficult to expand can be expanded, the types of ladder programs that can be expanded increase, and versatility is improved.
  • the support device extracts the combination of the contradictory contacts from the logic circuit obtained by combining the second type of contacts obtained by the deployment unit, and deletes the circuit formed by the contradictory contact combinations. May be further included.
  • the entire logic circuit can be simply represented. As a result, the flow of the entire logic circuit becomes easier to understand, and the cause of the non-functioning ladder program can be more easily specified.
  • the support device optimizes a redundant circuit by extracting a redundant combination of contacts from a logic circuit obtained by the expanding means and combining the second type of contacts, and removing a contact included in the redundant combination of contacts. Means may further be included.
  • the entire logic circuit can be simply represented. As a result, the flow of the entire logic circuit becomes easier to understand, and the cause of the non-functioning ladder program can be more easily specified.
  • the support device may further include a storage processing unit that performs a process of storing a logic circuit obtained by combining the second type of contacts obtained by the deployment unit.
  • the ladder program represented by the logic circuit obtained by combining the second type of contacts obtained by the developing means is of the first type compared to the ladder program represented by the logic circuit before being developed by the developing means.
  • the size of the data is small because it does not include intermediate variables such as the contact point.
  • a support program that supports development of a ladder program executed by a control device that controls a control target.
  • the support program displays, on a computer, the ladder program by a logic circuit combining a plurality of types of elements including a first type of contact indicating an operation result in the ladder program, and a logic including the first type of contact.
  • all the first-type contacts included in the logic circuit including the first-type contacts are subjected to a logical operation for obtaining an operation result indicated by the first-type contacts by a signal input from the outside. And developing the logic circuit into a combination of the second type of contacts shown.
  • the logic circuit including the first type of contact can be represented by a combination of the second type of contact. Therefore, the relationship between the output result of the logic circuit and the signal actually input from the outside is obtained. Can be displayed clearly.
  • FIG. 3 is a schematic diagram illustrating a hardware configuration example of a support device. It is an example of a ladder diagram. It is a figure showing the outline of development.
  • FIG. 9 is a ladder diagram reflecting execution results of a ladder program.
  • FIG. 9 is a ladder diagram reflecting execution results of a ladder program.
  • FIG. 4 is a diagram for explaining circuit optimization. It is an example of abbreviated display. It is a flowchart of a display process. It is a flowchart of a real contact point search process. It is a flowchart of a circuit change process. It is a figure for explaining inversion of a logical expression. It is a schematic diagram which shows the software configuration of a support device.
  • FIG. 1 is a diagram schematically illustrating an application scene of a support device 200 according to the present embodiment.
  • the support device 200 provides an environment for developing a control program executed by a control device such as a PLC (programmable controller) that controls a control target.
  • a control device such as a PLC (programmable controller) that controls a control target.
  • a control program executed by a control device such as a PLC generally includes a ladder diagram (LD: Ladder @ Diagram) and a function block diagram (FBD: Function @ Block @ Diagram) defined as a programming language of a PLC application in International Standard IEC61131-3. , A sequential function chart (SFC: Sequential @ Function @ Chart), an instruction list (IL: Instruction @ List), and a structured text (ST: Structured @ Text).
  • SFC Sequential @ Function @ Chart
  • IL Instruction @ List
  • ST Structured @ Text
  • the support device 200 includes a program display unit 260a that displays a ladder program described by a ladder diagram by a logic circuit in which a plurality of types of circuit elements are combined, and a logic circuit including an intermediate contact 544 that indicates an operation result in the ladder program. , A developing means 262a for developing a logic circuit not including the intermediate contact 544.
  • the plurality of types of circuit elements include contacts 542 and 544 that are turned on / off based on an external input signal, and a coil 560 that outputs a calculation result in the circuit.
  • the circuit element may include a function block in which predetermined processes are grouped.
  • the contact includes a real contact 542 that is turned on / off based on a signal input from the outside, and an intermediate contact 544 that is turned on / off based on a calculation result in a ladder program.
  • the developing means 262a expands the logic circuit including the intermediate contact 544 into a logic circuit not including the intermediate contact 544. Specifically, the developing unit 262a develops a logic circuit including the intermediate contact 544 into a logic circuit not including the intermediate contact 544 by rearranging the intermediate contact 544 into a circuit including the actual contact 542. Since the intermediate contact point 544 indicates the result of the operation in the ladder program, the operation can be represented by a combination of the actual contact points 542.
  • the developing unit 262a expands the logic circuit 520a including the contact (L) and the contact (M), which are the intermediate contacts 544.
  • the contact (L) indicates the result of the coil (L).
  • the coil (L) receives the result of the logic circuit combining the contact (h) and the contact (i), which are the actual contacts 542. Therefore, the contact (L) can be represented by a logic circuit combining the contact (h) and the contact (i).
  • the contact (M) indicates the result of the coil (M).
  • the coil (M) receives the result of the logic circuit combining the contact (j) and the contact (k), which are the actual contacts 542.
  • the contact (M) can be represented by a logic circuit combining the contact (j) and the contact (k).
  • the logic circuit 520a is developed into a logic circuit 520b in which the contact (h), the contact (i), the contact (k), and the contact (j), which are the actual contacts 542 that do not include the intermediate contact 544, are combined.
  • the intermediate contact 544 is further developed and the intermediate contact 544 is developed. The expansion is repeated until a logic circuit not including 544 is obtained.
  • the result output from the coil (N) is externally input. It is easy to understand which of the signals depends. That is, the relationship between the output result and the actual input signal can be easily understood.
  • FIG. 2 is a schematic diagram illustrating a configuration example of the control system 1 to which the support device 200 can be applied.
  • control system 1 includes a plurality of PLCs 100-1, 100-2, 100-3, 100-4,... (Hereinafter, also collectively referred to as “PLC 100”).
  • PLC 100 is an example of a control device that controls a control target that is a field device such as a relay and a sensor.
  • the support device 200 is connectable to the PLC 100 and provides an environment that supports development of a control program of the PLC 100.
  • the control system 1 may have a configuration including one PLC 100.
  • a development environment for one PLC 100 will be described.
  • the PLC 100 typically includes a CPU unit 10 which is a main body for executing various programs including a control program, a power supply unit 12 for supplying power to the CPU unit 10 and the like, and an I / O (I / O) for exchanging signals from a field. Input / Output) unit 14.
  • the I / O unit 14 is connected to the CPU unit 10 via the system bus 11.
  • the development support environment provided by the support device 200 may have an editor (editing) of a control program, a debugger, a simulator, and a monitor function for outputting these output information to a monitor such as a display.
  • the support device 200 further has a function of acquiring a state value of the running PLC 100 and outputting the acquired value to a monitor such as a display.
  • the support program which is an application program stored in the optical recording medium 8
  • various functions for the development support environment as described above are realized.
  • the support program may be downloaded from an external server device or the like via a network.
  • the support device 200 is connected to the CPU unit 10 of the PLC 100 via a connection cable, for example.
  • the support device 200 is typically realized by a personal computer.
  • FIG. 3 is a schematic diagram illustrating a hardware configuration example of the support device 200.
  • the support device 200 is typically configured by a general-purpose computer. Note that, from the viewpoint of maintainability at a manufacturing site where the PLC 100 is arranged, a notebook personal computer having excellent portability is preferable.
  • the support device 200 includes a storage unit 201 and a CPU 202 that executes various programs including an operating system (OS).
  • the storage unit 201 includes a ROM (Read Only Memory) 204 for storing BIOS and various data, a RAM (Random Access Memory) 206 for providing a work area for storing data necessary for executing a program in the CPU 202, And a hard disk (HDD) 208 for storing programs executed by the CPU 202 in a nonvolatile manner.
  • OS operating system
  • the storage unit 201 includes a ROM (Read Only Memory) 204 for storing BIOS and various data, a RAM (Random Access Memory) 206 for providing a work area for storing data necessary for executing a program in the CPU 202, And a hard disk (HDD) 208 for storing programs executed by the CPU 202 in a nonvolatile manner.
  • ROM Read Only Memory
  • RAM Random Access Memory
  • HDD hard disk
  • the support device 200 further includes an operation unit 203 including a keyboard 210 and a mouse 212 operated by the user to input an instruction to the support device 200, and a display 214 for presenting information to the user.
  • the support device 200 includes a communication interface 218 for communicating with the PLC 100 (CPU unit 10) and the like.
  • the communication interface 218 may include a USB communication module for communicating with a USB interface provided in the PLC 100.
  • the support device 200 includes an optical recording medium reader 216 for reading a support program for providing a development support environment stored in the optical recording medium 8 from the optical recording medium 8.
  • FIG. 3 illustrates a configuration example in which a processor such as the CPU 202 provides necessary functions by executing a program.
  • a processor such as the CPU 202 provides necessary functions by executing a program.
  • some or all of the provided functions may be replaced by dedicated hardware circuits (for example, , ASIC or FPGA).
  • a plurality of OSs having different purposes may be executed in parallel using virtualization technology, and a required application may be executed on each OS.
  • the support device 200 can present a user program executed by the PLC to the user via the display 214.
  • the user program is a type of control program executed by the PLC 100 and is a program created according to a control target.
  • the user program includes a ladder diagram (LD: Ladder Diagram), a function block diagram (FBD), a sequential function chart (SFC: Sequential Function Chart), and an instruction list (IL: Instruction List) and structured text (ST: Structured Text) are described in any one of five programming languages.
  • the user program according to the present embodiment is a “ladder program” described by a ladder logic circuit (logic circuit) or an instruction code of an operation represented by a combination of the ladder logic circuits.
  • the ladder program is represented by a ladder diagram 510 in which a logic circuit (hereinafter, also simply referred to as “circuit”) using circuit elements and connection lines between an input-side bus 512 and an output-side bus 514 is drawn in a ladder shape.
  • circuit a logic circuit (hereinafter, also simply referred to as “circuit”) using circuit elements and connection lines between an input-side bus 512 and an output-side bus 514 is drawn in a ladder shape.
  • FIG. 4 is an example of a ladder diagram.
  • the circuit element includes a contact 540 that is turned on / off based on an input signal, and a coil 560 that outputs on / off.
  • the ON state is also referred to as a conductive state
  • the OFF state is also referred to as a non-conductive state.
  • the ladder diagram 510 is drawn by connecting circuit elements such as a contact 540 and a coil 560 with a connection line 580.
  • One circuit includes a portion indicating a logical operation expressed by combining the contacts 540 and an output portion for outputting a result of the logical operation, and the coil 560 corresponds to the output portion.
  • the circuit element may include a function block in which predetermined processes are grouped.
  • the contact 540 is turned on / off based on a signal input from the outside (hereinafter, also referred to as “actual contact 542”) and the contact turned on / off based on a calculation result in a ladder program (hereinafter, referred to as “contact”). "Intermediate contact point 544").
  • the ladder diagram 510 includes, as the actual contacts 542, contacts (sensor 1) to contacts (sensor 5) that are turned on / off by receiving signals from the sensors 1 to 5, and an intermediate contact 544 Includes contacts (A) to (C) that are turned on / off in response to output results of the coils (A) to (C).
  • some reference numerals are omitted for convenience.
  • some circuits are omitted for convenience, and "" indicates that the circuits are omitted.
  • the ladder program shown in FIG. 4 is represented by a ladder diagram 510 including five logic circuits. Specifically, the ladder program is represented by a ladder diagram 510 including a first circuit 521, a second circuit 522, a third circuit 523, a fourth circuit 524, and a fifth circuit 525.
  • Coil (A) indicates the calculation result of the first calculation 51.
  • the contact (A) is turned on / off in response to the output result of the coil (A). That is, it can be said that the contact point (A) indicates the output result of the coil (A), in other words, the contact point (A) indicates the result of the first calculation 51.
  • Coil (B) indicates the result of the second operation 52 composed of a combination of the contact (A) as the intermediate contact 544 and the contact (sensor 3) as the actual contact 542.
  • the second operation 52 is executed with reference to the result of the first operation 51.
  • Coil (C) shows the result of the third calculation 53 composed of a combination of the contact (B) as the intermediate contact 544 and the contact (sensor 4) as the actual contact 542.
  • the third operation 53 is executed with reference to the result of the second operation 52.
  • the second operation 52 is executed by referring to the result of the first operation 51.
  • Coil (D) indicates the result of the fourth operation 54 which is a combination of the contact (C) as the intermediate contact 544 and the contact (sensor 5) as the actual contact 542.
  • the fourth operation 54 is executed by referring to the result of the third operation 53.
  • the third operation 53 is executed by referring to the result of the second operation 52.
  • the second operation 52 is executed by referring to the result of the first operation 51.
  • the support device 200 can represent a circuit including the intermediate contact 544 indicating the calculation result in a format not including the intermediate contact 544. Expressing a circuit including the intermediate contact 544 in a form that does not include the intermediate contact 544 is also referred to as “development”.
  • FIG. 5 is a diagram showing an outline of the development.
  • the ladder program shown by the ladder diagram 510 in FIG. 5 is equal to the ladder program shown by the ladder diagram 510 in FIG.
  • the intermediate contact 544 is indicated by a thick line for convenience.
  • the circuit is developed by a circuit indicating an operation received by the selected intermediate contact 544 or a circuit including the selected coil 560 when a predetermined operation is received in a state where the intermediate contact 544 or the coil 560 is selected. Done. In the example shown in FIG. 5, a predetermined operation is received in a state where the coil (D) shown in FIG. 4 is selected, and the fifth circuit 525 is developed into a form not including the intermediate contact 544.
  • the fifth circuit 525 is developed in order from the input-side bus 512 to the output-side bus 514. Specifically, the development is performed sequentially from the contact (C) which is the intermediate contact 544 located at the left end of the fifth circuit 525. Since the contact point (C) indicates the result of the third operation 53, it can be replaced with the third operation 53.
  • the third operation 53 includes the contact (B) which is the intermediate contact 544, so that the intermediate contact 544 remains. Then, next, the contact (B) which is the intermediate contact 544 is developed. Since the contact (B) indicates the result of the second operation 52, the contact (B) can be replaced with the second operation 52.
  • the second operation 52 includes the contact (A) which is the intermediate contact 544, so that the intermediate contact 544 remains. Then, next, the contact (A) which is the intermediate contact 544 is developed. Since the contact point (A) indicates the result of the first operation 51, it can be replaced with the first operation 51.
  • the fifth circuit 525 is all represented by the actual contact 542.
  • the relationship between the output result of the circuit including the intermediate contact 544 and a signal input from the outside can be easily understood. Circuit.
  • 6 and 7 are ladder diagrams on which the execution results of the ladder program are reflected.
  • the execution result includes a result of the execution of the ladder program by the PLC 100 and a simulation result executed in the support device 200.
  • 6 and 7 the output of the execution result is indicated by a so-called power flow display, which is indicated by a bold line.
  • the common execution result is reflected in the ladder diagram 510 shown in FIGS.
  • FIG. 7 it is assumed that the circuit X shown in FIG. 6 is developed. In FIG. 6, some circuits are omitted for convenience, and " " indicates that the circuit is omitted.
  • a signal starting with “I” indicates an external signal
  • a signal starting with “Q” indicates a result of a logical operation in the ladder program.
  • FIG. 8 is a diagram for explaining circuit optimization.
  • a contradictory combination of contacts means that different types of contacts that receive a common signal are connected in series. Specifically, the different types of contacts are a contact that conducts when the input signal is on, and a b contact that conducts when the input signal is off.
  • the circuit indicated by the logical operation X1 in the circuit X includes a portion where a contact X1a that turns on when a signal from I02 is on and a contact X1b that turns on when a signal from I02 is off is connected in series. That is, when the signal from I02 is on, the contact X1a conducts but the contact X1b does not conduct, so that the circuit including the logical operation X1 does not conduct. Therefore, since the circuit indicating the logical operation X1 does not affect the result of the circuit X, the circuit indicating the logical operation X1 can be deleted from the circuit X.
  • a redundant contact combination means that the contacts of the same type that receive a common signal are connected in series, or the contacts of different types that receive the common signal are connected in parallel.
  • the circuit indicated by the logical operation X2 in the circuit X includes a portion where a contact X2a that is turned on when a signal from I04 is on and a contact X2b that is turned on when a signal from I04 is on is connected in series. That is, even if one of the contacts X2a and X2b is deleted, the result of the circuit X is not affected, so that one of the contacts X2a and X2b can be deleted.
  • a contact X3a that turns on when the signal from I09 is on and a contact X3b that turns on when the signal from I09 is off are connected in parallel with each other. That is, when the signal from I09 is on, the contact X3a is conductive, and when the signal from I09 is off, the contact X3b is conductive. Therefore, the circuits connected in parallel have substantially no meaning. That is, even if the contacts X3a and X3b are deleted, the result of the circuit X is not affected, so that the contacts X3a and X3b can be deleted.
  • the ladder diagram shown in the lower part of FIG. 8 is a ladder program after optimizing by removing circuits and contacts that do not affect the result.
  • the entire ladder program can be simply represented by deleting circuits and contacts that do not affect the result.
  • the simplified representation makes it easier to understand the flow of the entire process, and also makes it easier to identify the cause when the process is not executed.
  • FIGS. 5, 7, and 8 when the circuit is expanded, the display becomes long horizontally and may not fit in the display area of the display 214.
  • the support device 200 can display the developed circuit by omitting a part of the circuit.
  • FIG. 9 is an example of an abbreviated display.
  • the contact (I19) and the contact (I13), which are non-conductive contacts connected to the contact in the conductive state, the contact (I13), and the coil (Q5) are displayed while the contact (I19) is displayed.
  • the coil (Q5), and the elements between the contact (I13) and the coil (Q5) are omitted.
  • FIG. 10 is a flowchart of the display process.
  • the CPU 202 reads the instruction code included in the support program stored and provided in the optical recording medium 8, executes a display process, and displays a ladder diagram 510 on the display 214.
  • a description will be given assuming that the execution result of the ladder program executed in the PLC 100 is displayed.
  • step S1 the CPU 202 determines whether a ladder display instruction has been detected.
  • the ladder display instruction is an instruction for displaying the ladder diagram 510 on the display 214, and includes a direct instruction for displaying the ladder diagram 510 and an instruction for displaying the execution result of the ladder program.
  • step S1 If the ladder display instruction has not been detected (NO in step S1), CPU 202 ends the display processing. If a ladder display instruction has been detected (YES in step S1), CPU 202 switches the process to step S2.
  • step S2 the CPU 202 reads the ladder program.
  • the ladder program is stored in a storage unit such as a flash memory provided in the CPU unit 10 of the PLC 100.
  • the CPU 202 reads a ladder program from the storage unit of the CPU unit 10 via the communication interface 218.
  • the CPU 202 reads the ladder program from the storage unit 201.
  • the CPU 202 also reads the execution result of the ladder program.
  • step S3 the CPU 202 displays a ladder diagram indicating the read ladder program and an execution result on the display 214.
  • the CPU 202 displays the ladder diagram 510 before the circuit is expanded on the display 214 by executing the process of step S3, as shown in FIGS. 4 and 6.
  • step S4 the CPU 202 determines whether the intermediate contact 544 or the coil 560 has been selected. If it is determined that no selection has been made (NO in step S4), CPU 202 ends the display process. If it is determined that the selection has been made (YES in step S4), CPU 202 switches the process to step S5.
  • the CPU 202 determines whether or not a deployment instruction has been detected.
  • the deployment instruction is a predetermined operation, and may be an operation set by a user or an operation predetermined by a program provider.
  • step S5 If it is determined that the expansion instruction has not been detected (NO in step S5), the CPU 202 ends the display processing. If it is determined that a deployment instruction has been detected (YES in step S5), CPU 202 switches the process to step S6.
  • step S6 the CPU 202 performs a real contact point search process.
  • the CPU 202 executes the real contact point search process to express the circuit indicating the operation received by the selected intermediate contact point 544 or the circuit including the selected coil in the form not including the intermediate contact point 544. Is stored in the storage unit 201.
  • step S7 the CPU 202 displays the ladder program stored in the storage unit 201 and ends the processing. That is, in step S7, an expanded circuit as shown in FIG. 5 or FIG. 7 is displayed.
  • the display method may be to display the expanded circuit in a window different from the window in which the circuit before expansion is displayed, and to display the circuit before expansion and the circuit after expansion.
  • the display may be updated.
  • FIG. 11 is a flowchart of the actual contact point search processing.
  • the actual contact point search processing is processing for developing a circuit indicated by the selected intermediate contact or coil into a circuit that does not include the intermediate contact 544.
  • step S602 the CPU 202 determines whether a coil has been selected. More specifically, CPU 202 determines whether or not a coil has been selected in step S4. If it is determined that the coil has not been selected (NO in step S602), that is, if the intermediate contact 544 has been selected, the CPU 202 refers to the coil indicated by the selected intermediate contact 544 in step S604, and proceeds to step S604. Proceed to S606.
  • step S602 If it is determined that a coil has been selected (YES in step S602), CPU 202 switches the process to step S606.
  • step S606 the CPU 202 stores the circuit including the coil in the storage unit 201.
  • step S608 the CPU 202 extracts the contacts (N) included in the circuit stored in the storage unit 201. It is assumed that the number of contacts extracted in step S608 is n.
  • step S610 the CPU 202 determines whether or not all the contacts (N) are the actual contacts 542. If all of them are the actual contacts 542 (YES in step S610), the process ends, and the process returns to the display process. When a contact other than the actual contact 542 is included (NO in step S610), that is, when the intermediate contact 544 is included, the CPU 202 switches the process to step S612.
  • one contact (N) of the plurality of contacts (N) is selected.
  • m 1, the first contact point (N) is selected.
  • step S614 the CPU 202 determines whether or not the contact (N) is the actual contact 542. If the contact (N) is not the real contact 542 (NO in step S614), that is, if the contact (N) is the intermediate contact 544, the CPU 202 executes step S616, and then proceeds to step S618. If the contact (N) is the actual contact 542 (YES in step S614), the CPU 202 proceeds to step S618 without executing step S616.
  • step S616 the CPU 202 performs a circuit change process.
  • a circuit incorporating a logical operation of a circuit including a coil corresponding to the contact (N) is stored in the storage unit 201 instead of the contact (N).
  • step S618 the CPU 202 adds 1 to m. That is, in step S618, the point of contact (N) of interest is changed.
  • step S620 the CPU 202 determines whether m is equal to or less than n. Until it is determined that m exceeds n, the CPU 202 repeats the processing of steps S614 to S618.
  • the fact that m exceeds n means that for all the contacts (N) extracted in step S608, it is determined whether the contact (N) is the real contact 542 or the intermediate contact 544. In the case of the intermediate contact 544, it means that a circuit including a coil corresponding to the contact (N) is installed instead of the intermediate contact 544, and the circuit is stored in the storage unit 201.
  • step S620 If it is determined that m exceeds n (YES in step S620), CPU 202 proceeds to step S608.
  • step S608 the CPU 202 extracts the contact point (N) again. That is, since the circuit stored in the storage unit 201 is changed by the circuit change processing in step S616, the CPU 202 performs the processing in steps S608 to S620 on the changed circuit, and in step S610, Steps S608 to S620 are repeated until it is determined that all of (N) are the actual contacts 542.
  • the coil corresponding to the selected intermediate contact or the circuit including the selected coil is developed into a form not including the intermediate contact 544.
  • FIG. 12 is a flowchart of the circuit change processing.
  • the circuit changing process is a process for incorporating a logical operation of a circuit including a coil corresponding to the contact (N) into the circuit instead of the contact (N).
  • step S702 the CPU 202 generates a circuit (D) including the coil indicated by the contact (N).
  • step S704 the CPU 202 determines whether or not the contact (N) is a contact. That is, it is determined whether the contact (N) is an a-contact that turns on when the circuit (D) conducts or a b-contact that turns on when the circuit (D) does not conduct.
  • step S704 When it is determined that the contact (N) is the a contact (YES in step S704), the CPU 202 switches the processing to step S706.
  • step S706 the CPU 202 changes the contact (N) of the circuit stored in the storage unit 201 to a combination of contacts not including a coil in the circuit (D), and ends the process.
  • step S704 If it is determined that the contact (N) is not the a contact (NO in step S704), that is, if it is determined that the contact (N) is the b contact, the CPU 202 switches the process to step S708.
  • step S708 a circuit (E) is generated by inverting the logical expression indicated by the logical operation received by the coil of the circuit (D).
  • step S710 the CPU 202 changes the contact (N) of the circuit stored in the storage unit 201 to the circuit (E) and ends the process.
  • the fact that the contact (N) is the b-contact means that the contact (N) is turned on when the circuit (D) indicated by the contact (N) is non-conductive. That is, the contact (N) is turned on when the circuit (E) obtained by inverting the logical expression shown by the circuit (D) is turned on. Therefore, when the contact (N) is the b contact, the contact (N) is connected to the circuit. By replacing with (E), the processing can be developed without changing the processing contents.
  • FIG. 13 is a diagram for explaining inversion of the logical expression.
  • the contact (f) shown in FIG. 13 is the target contact (N). Since the contact (f) is a b-contact, the contact (f) generates a circuit (E) in which the logical expression of the circuit (D) receiving the result is inverted.
  • the circuit (E) is a circuit that becomes non-conductive when the circuit (D) conducts, and is generated by being developed according to De Morgan's law as shown in FIG.
  • a circuit indicated by the logical operation received by the coil corresponding to the contact b is used instead of the contact b.
  • FIG. 14 is a schematic diagram illustrating a software configuration of the support device 200.
  • the instruction code included in the software illustrated in FIG. 14 is read at an appropriate timing, provided to the CPU 202 of the support device 200, and executed.
  • the software shown in FIG. 14 is included in a support program stored and provided in the optical recording medium 8.
  • OS 240 and programming application 250 are mounted on support device 200.
  • the support device 200 executes the OS 240 and provides an environment in which the programming application 250 can be executed.
  • a support program for implementing the support device 200 according to the present embodiment includes at least a programming application 250.
  • the programming application 250 includes an editor 252, a compiler 254, a debugger 256, a simulator 258, a GUI (Graphical User Interface) module 260, an expansion module 262, a result output module 264, an optimization module 266, and data storage. Unit 270.
  • Each module included in the programming application 250 is typically distributed while being stored as a support program in the optical recording medium 8 and installed in the support device 200.
  • the editor 252 provides functions such as input and editing for creating an executable program (source program). More specifically, the editor 252 provides a function of saving the created ladder program 274 and a function of editing the created ladder program 274 in addition to the function of the user operating the keyboard 210 and the mouse 212 to create the source program of the ladder program 274. The editor 252 stores the created ladder program 274 in the data storage unit 270.
  • the compiler 254 provides a function of compiling the source program of the ladder program 274 and generating an executable program in the form of an executable (object) program in the CPU unit 10.
  • the debugger 256 provides a function for debugging an executable program (source program).
  • the contents of the debugging include an operation of partially executing a range specified by the user in the source program and an operation of tracking a temporal change of a variable value during execution of the source program. That is, the functions provided by the debugger 256 include a function of acquiring the execution result of the ladder program 274.
  • the simulator 258 establishes an environment for simulating the execution of a program in the CPU unit 10 of the PLC 1 in the support device 200.
  • the GUI module 260 provides a function of displaying a ladder program as a ladder diagram 510. That is, the ladder diagram 510 described above is provided by the GUI module 260.
  • the GUI module 260 provides the ladder diagram 510 based on the operation received by the operation unit 203, the ladder program 274, the variable setting 272 necessary for executing the program, and the object information 278 about the object. Further, the GUI module 260 displays the expanded ladder program 276 generated according to the operation received by the operation unit 203 on the display 214 as a ladder diagram 510. That is, the GUI module 260 provides the function of the program display unit of the present invention.
  • the expansion module 262 provides a function of expanding a circuit including the intermediate contact 544 into a format not including the intermediate contact 544 based on an operation received by the operation unit 203.
  • the expansion module 262 provides a function of storing the expanded ladder program 276 in the data storage unit 270. That is, the expansion module 262 provides the function of the expansion unit of the present invention and the function of the storage processing unit.
  • the ladder program 276 after expansion is a program that does not include intermediate variables, such as the intermediate contact point 544, and therefore has a smaller data size than the ladder program 276 before expansion.
  • the developed ladder program 276 can be downloaded to the PLC 100. As a result, the memory usage of the PLC 100 can be reduced.
  • the result output module 264 provides a function of receiving the execution result of the ladder program and outputting the conduction state of the logic circuit. That is, the result output module 264 provides the function of the output unit of the present invention. Specifically, the result output module 264 receives the execution result of the program executed by the simulator 258 and the execution result of the program obtained by the debugger 256, generates a conduction state of the logic circuit, and The generated conduction state is reflected in the displayed logic circuit. Thus, the power flow display shown in FIGS. 6 to 9 is performed.
  • the optimization module 266 provides a function of deleting an inconsistent portion or a redundant portion from the developed ladder program 276. That is, the optimization module 266 provides the function of the optimization unit of the present invention.
  • the optimization module 266 may search for and delete an inconsistent portion or a redundant portion based on an operation received by the operation unit 203 while the ladder program 276 after expansion is displayed. Further, when the circuit including the intermediate contact 544 is developed by the developing module 262 into a format not including the intermediate contact 544, an inconsistent portion or a redundant portion may be searched and deleted.
  • the optimizing module 266 may separately store the ladder program from which the contradictory portion or the redundant portion has been deleted in the data storage unit 270, or may store it as the ladder program 276 after expansion.
  • the optimization module 266 stores the ladder program after removing the inconsistent portion or the redundant portion, so that the simplified ladder program can be downloaded to the PLC 100. As a result, the memory usage of the PLC 100 can be reduced, and the processing can be speeded up.
  • the data storage unit 270 stores a ladder program 274, a variable setting 272, a developed ladder program 276, and object information 278.
  • a logic circuit 521, 522, 523, 524, 525, X
  • the program display means for a logic circuit obtained by combining the second type of contacts obtained by the developing means, a conductive contact and a non-conductive contact (contact (contact ()) connected to the conductive contact. I17), the contact (I13)), and do not display an element located between the non-conductive contact connected to the conductive contact and the coil indicating the output result. apparatus.
  • Optimizing means for extracting a redundant contact combination (X2, X3) from a logic circuit obtained by combining the second type of contacts obtained by the expanding means, and deleting a contact included in the redundant contact combination The support device according to any one of Configurations 1 to 4, further comprising (266).
  • ⁇ Configuration 7> The support device according to any one of Configurations 1 to 6, further comprising a storage processing unit (262) configured to store a logic circuit obtained by combining the first type of contacts obtained by the expansion unit. .
  • a support program (250) for supporting development of a ladder program executed by a control device that controls a control target The support program is stored in a computer. Displaying the ladder program by a logic circuit combining a plurality of types of elements including a first type of contact indicating an operation result in the ladder program (S3); For a logic circuit including the first type of contact, all the first type of contacts included in the logic circuit including the first type of contact are represented by an operation result indicated by the first type of contact. Developing a logical operation to be obtained into a logical circuit combining a second type of contact indicating a signal input from the outside (S6).

Landscapes

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

Abstract

出力結果と実際の入力信号との関係性とが分かりやすい開発環境を提供する。サポート装置は、ラダープログラム内の演算結果に基づいてオン/オフされる中間接点を含む論理回路について、中間接点を外部からの入力信号に基づいてオン/オフする実接点を組み合わせた回路に組み替えることで、中間接点を含む論理回路から中間接点を含まない論理回路に展開する。

Description

サポート装置およびサポートプログラム
 本開示は、制御対象を制御する制御装置において実行される制御プログラムの作成を支援するサポート装置およびそれを実現するためのサポートプログラムに関する。
 様々な製造現場において、PLC(Programmable Logic Controller)などの制御装置が導入されている。このような制御装置は、一種のコンピュータであり、製造装置や製造設備などに応じて設計されたユーザプログラムが実行される。このようなユーザプログラムは、制御装置とは別に用意された開発環境にて作成される。開発環境を提供するとともに、制御装置に対してユーザプログラムをアップロードし、あるいは、制御装置に対してユーザプログラムをダウンロードする機能を提供する装置は、サポート装置とも称される。制御装置で実行されるユーザプログラムは、例えばIEC61131-3等で規定されるラダー言語により、ラダーロジック回路(論理回路)またはラダーロジック回路の組み合わせにより表される演算の命令コードで記述される「ラダープログラム」を含む。
 ラダープログラムは、ラダー図により表現される。ラダー図は、接点およびコイル等の組み合わせで表現される論理回路が梯子状に描かれた構成を有している。コイルは、接点を組み合わせた論理演算の結果の出力先を示す。また、一の論理回路が他の論理回路の結果を受け、さらに、他の論理回路が、また別の他の論理回路の結果を受けるような階層的な表現でラダー図は描かれることもある。このような場合、一の論理回路が多階層的に表現されるため、作成した論理回路が動作しない原因を特定しにくいという課題があった。
 例えば、特開2016-170662号公報(特許文献1)は、論理回路であるラダー回路が動作しない原因を容易に見つけることを目的として、確認対象のラダー回路より前に位置する直近の分岐回路を検索し、検索した分岐回路の種類に基づいてラダープログラム内から表示対象とすべき分岐回路を抽出して表示する装置を開示する。
特開2016-170662号公報
 特許文献1に開示の装置は、抽出した各分岐回路を別々に表示するのであって、一本の繋がった論理回路とはならないため、一の論理回路の出力結果を得るための論理演算の全体像が分かりにくく、言い換えると、出力結果と実際の入力信号との関係性とが分かりにくいという課題が残る。
 本開示の一つの目的は、出力結果と実際の入力信号との関係性とが分かりやすい開発環境を提供することである。
 本開示の一例によれば、制御対象を制御する制御装置において実行されるラダープログラムの作成を支援するサポート装置が提供される。サポート装置は、ラダープログラムを、複数種類の要素を組み合わせた論理回路により表示するプログラム表示手段と、ラダープログラム内の演算結果を示す第1の種類の接点を含む論理回路について、第1の種類の接点を含む論理回路に含まれる全ての第1の種類の接点を、第1の種類の接点が示す演算結果を得るための論理演算を外部から入力された信号を示す第2の種類の接点を組み合わせた論理回路に展開する展開手段とを含む。
 この開示によれば、第1の種類の接点を含む論理回路を第2の種類の接点の組み合わせで表すことができるため、論理回路の出力結果と、実際に外部から入力される信号との関係とを分かりやすく表示することができる。
 上述の開示において、サポート装置は、ラダープログラムの実行結果を受けて、ラダープログラムを示す論理回路の導通状態を出力する出力部をさらに含んでもよい。
 この開示によれば、論理回路の導通状態から、ラダープログラムが機能していない原因を容易に特定できる。特に、論理回路が第2の種類の接点だけで表すことができるため、ラダープログラムが機能していない直接の原因をさらに容易に特定することができる。
 上述の開示において、プログラム表示手段は、展開手段によって得られた第2の種類の接点を組み合わせた論理回路について、導通状態の接点と、導通状態の接点に接続された非導通状態の接点とを表示し、導通状態の接点に接続された非導通状態の接点から出力結果を示すコイルまでの間に位置する要素を表示しないようにしてもよい。
 この開示によれば、ラダープログラムが機能していない原因を特定する上で必要な箇所のみ表示し、不要な箇所を表示しないようにすることで、表示する情報量が減り、ラダープログラムが機能していない原因をさらに容易に特定することができる。
 上述の開示において、展開手段は、第1の種類の接点が偽の演算結果を受けて導通状態となるb接点である場合に、第1の種類の接点を、第1の種類の接点が受ける演算の論理表現を反転した演算を示す論理回路に換えることで、第1の種類の接点が示す演算結果を得るための論理演算を第2の種類の接点を組み合わせた論理回路に展開してもよい。
 この開示によれば、展開が難しい論理回路についても展開をすることができ、展開することのできるラダープログラムの種類が増え、汎用性が高まる。
 上述の開示において、サポート装置は、展開手段によって得られた第2の種類の接点を組み合わせた論理回路から矛盾する接点の組み合わせを抽出し、矛盾する接点の組み合わせからなる回路を削除する最適化手段をさら含んでもよい。
 この開示によれば、論理回路全体を簡潔に表すことができる。その結果、論理回路全体の流れがより分かり易くなり、ラダープログラムが機能していない原因をさらに容易に特定することができる。
 上述の開示において、サポート装置は、展開手段によって得られた第2の種類の接点を組み合わせた論理回路から冗長な接点の組み合わせを抽出し、冗長な接点の組み合わせに含まれる接点を削除する最適化手段をさら含んでもよい。
 この開示によれば、論理回路全体を簡潔に表すことができる。その結果、論理回路全体の流れがより分かり易くなり、ラダープログラムが機能していない原因をさらに容易に特定することができる。
 上述の開示において、サポート装置は、展開手段によって得られた第2の種類の接点を組み合わせた論理回路を保存する処理を行う保存処理手段をさらに含んでもよい。
 この開示によれば、展開手段によって得られた第2の種類の接点を組み合わせた論理回路が示すラダープログラムは、展開手段によって展開する前の論理回路が示すラダープログラムに比べて、第1の種類の接点のような中間変数を含まない分、データのサイズが小さい。このようなデータのサイズが小さくなったラダープログラムを保存しておくことで、データのサイズが小さくなったラダープログラムを利用することができ、制御装置のメモリの使用量を減らすことができる。
 本開示の別の一例によれば、制御対象を制御する制御装置で実行されるラダープログラムの開発を支援するサポートプログラムが提供される。サポートプログラムはコンピュータに、ラダープログラムを、ラダープログラム内の演算結果を示す第1の種類の接点を含む複数種類の要素を組み合わせた論理回路により表示するステップと、第1の種類の接点を含む論理回路について、第1の種類の接点を含む論理回路に含まれる全ての第1の種類の接点を、第1の種類の接点が示す演算結果を得るための論理演算を外部から入力された信号を示す第2の種類の接点を組み合わせた論理回路に展開するステップとを実行させる。
 この開示によれば、第1の種類の接点を含む論理回路を第2の種類の接点の組み合わせで表すことができるため、論理回路の出力結果と、実際に外部から入力される信号との関係とを分かりやすく表示することができる。
 本開示の一例によれば、出力結果と実際の入力信号との関係性とが分かりやすい開発環境を提供できる。
本実施の形態に係るサポート装置の適用場面を模式的に示す図である。 サポート装置を適用可能な制御システムの構成例を示す模式図である。 サポート装置のハードウェア構成例を示す模式図である。 ラダー図の一例である。 展開の概要を示す図である。 ラダープログラムの実行結果が反映されたラダー図である。 ラダープログラムの実行結果が反映されたラダー図である。 回路の最適化について説明するための図である。 省略表示の一例である。 表示処理のフローチャートである。 実接点探索処理のフローチャートである。 回路変更処理のフローチャートである。 論理表現の反転を説明するための図である。 サポート装置のソフトウェア構成を示す模式図である。
 本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。
 §1 適用例
 まず、図1を参照して、本発明が適用される場面の一例について説明する。図1は、本実施の形態に係るサポート装置200の適用場面を模式的に示す図である。サポート装置200は、たとえば、制御対象を制御するPLC(プログラマブルコントローラ)などの制御装置で実行される制御プログラムを開発する環境を提供する。
 PLCなどの制御装置で実行される制御プログラムは、通常、国際規格IEC61131-3においてPLCアプリケーションのプログラミング言語として規定された、ラダーダイアグラム(LD:Ladder Diagram)、ファンクションブロックダイアグラム(FBD:Function Block Diagram)、シーケンシャルファンクションチャート(SFC:Sequential Function Chart)、インストラクションリスト(IL:Instruction List)、ストラクチャードテキスト(ST:Structured Text)の5種類のプログラミング言語で記述される。本発明においては、制御装置で実行される制御プログラムのうち、ラダーダイアグラムで記述されたラダープログラムを対象とする。
 サポート装置200は、ラダーダイアグラムで記述されたラダープログラムを、複数種類の回路要素を組み合わせた論理回路により表示するプログラム表示手段260aと、ラダープログラム内の演算結果を示す中間接点544を含む論理回路を、中間接点544を含まない論理回路に展開する展開手段262aとを備える。
 複数種類の回路要素には、外部からの入力信号に基づいてオン/オフする接点542,544と、回路内の演算結果を出力するコイル560とを含む。なお、回路要素は、所定の処理を一まとめにしたファンクションブロックを含んでもよい。
 接点は、外部から入力される信号に基づいてオン/オフされる実接点542と、ラダープログラム内の演算結果に基づいてオン/オフされる中間接点544とを含む。
 展開手段262aは、中間接点544を含む論理回路を、中間接点544を含まない論理回路に展開する。具体的には、展開手段262aは、中間接点544を、実接点542を組み合わせた回路に組み替えることで、中間接点544を含む論理回路から中間接点544を含まない論理回路に展開する。中間接点544は、ラダープログラム内の演算結果を示すものであるから、演算を実接点542の組み合わせにより表現することができる。
 図1に示す例では、展開手段262aは、中間接点544である接点(L)と接点(M)とを含む論理回路520aを展開する。接点(L)は、コイル(L)の結果を示す。コイル(L)は、実接点542である接点(h)と接点(i)とを組み合わせた論理回路の結果を受ける。よって、接点(L)を接点(h)と接点(i)とを組み合わせた論理回路で表現することができる。また、同様に、接点(M)は、コイル(M)の結果を示す。コイル(M)は、実接点542である接点(j)と接点(k)とを組み合わせた論理回路の結果を受ける。よって、接点(M)を接点(j)と接点(k)とを組み合わせた論理回路で表現することができる。その結果、論理回路520aは、中間接点544を含まない実接点542である接点(h),接点(i),接点(k),および接点(j)を組み合わせた論理回路520bに展開される。
 なお、接点(h),接点(i),接点(k),および接点(j)のうちのいずれかの接点が中間接点544である場合には、さらにその中間接点544を展開し、中間接点544を含まない論理回路となるまで、展開が繰り返される。
 このように、中間接点544を含む論理回路520aが、中間接点544を含まない実接点542で表した論理回路520bに展開されることで、コイル(N)が出力する結果が、外部から入力されるいずれの信号に依存するのかが分かり易い。すなわち、出力結果と実際の入力信号との関係を分かりやすくすることができる。
 §2 具体例
 以下、本発明の具体例として、本実施の形態に係るサポート装置200のより詳細な構成および処理について説明する。
 <A.制御システム1の全体構成例>
 図2は、サポート装置200を適用可能な制御システム1の構成例を示す模式図である。図2を参照して、制御システム1は、複数のPLC100-1,100-2,100-3,100-4,…(以下、「PLC100」とも総称する。)を含んでいる。PLC100の各々は、リレー,センサ等のフィールド機器である制御対象を制御する制御装置の一例である。サポート装置200は、PLC100に接続可能であり、PLC100の制御プログラムの開発を支援する環境を提供する。制御システム1は、1台のPLC100を含む構成であってもよい。以下では、説明を簡単にするために、1台のPLC100を対象にした開発環境を説明する。
 PLC100は、典型的には、制御プログラムを含む各種プログラムを実行する主体であるCPUユニット10と、CPUユニット10などへ電力を供給する電源ユニット12と、フィールドからの信号を遣り取りするI/O(Input/Output)ユニット14とを含む。I/Oユニット14は、CPUユニット10とシステムバス11を介して接続されている。
 サポート装置200が提供する開発支援環境は、制御プログラムのエディタ(編集)、デバッカ、シミュレータおよびこれらの出力情報をディスプレイ等のモニタに出力するためのモニタ機能等を有し得る。サポート装置200は、さらに、運転中のPLC100の状態値を取得し、ディスプレイ等のモニタに出力する機能なども備える。
 光学記録媒体8に格納されたアプリケーションプログラムであるサポートプログラムがサポート装置200にインストールされることで、上述したような開発支援環境のための各種機能が実現される。光学記録媒体8に代えて、外部のサーバ装置などからネットワークを介して、サポートプログラムをダウンロードするようにしてもよい。サポート装置200は、一例として、接続ケーブルを介してPLC100のCPUユニット10と接続される。サポート装置200は、典型的には、パーソナルコンピュータで実現される。
 <B.サポート装置200のハードウェア構成例>
 図3は、サポート装置200のハードウェア構成例を示す模式図である。サポート装置200は、典型的には、汎用のコンピュータで構成される。なお、PLC100が配置される製造現場における保守性の観点からは、可搬性に優れたノート型のパーソナルコンピュータが好ましい。
 サポート装置200は、記憶部201と、オペレーティングシステム(OS)を含む各種プログラムを実行するCPU202とを備える。記憶部201は、BIOSや各種データを格納するROM(Read Only Memory)204と、CPU202でのプログラムの実行に必要なデータを格納するための作業領域を提供するRAM(Random Access Memory)206と、CPU202で実行されるプログラムなどを不揮発的に格納するハードディスク(HDD)208とを含む。
 サポート装置200は、さらに、サポート装置200に指示を入力するためにユーザが操作するキーボード210およびマウス212を含む操作部203、および情報をユーザに提示するためのディスプレイ214を含む。サポート装置200は、PLC100(CPUユニット10)などと通信するための通信インターフェイス218を含む。通信インターフェイス218は、PLC100が備えるUSBインターフェイスと通信するためにUSB通信モジュールを含み得る。
 サポート装置200は、光学記録媒体8からそれに格納されている開発支援環境を提供するためのサポートプログラムを読み取るための光学記録媒体読取装置216を含む。
 図3には、CPU202等のプロセッサがプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOSを並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
 <C.ラダープログラムの表示方法>
 サポート装置200は、ディスプレイ214を介して、PLCで実行されるユーザプログラムをユーザに提示可能である。ユーザプログラムは、PLC100で実行される制御プログラムの一種であり、制御対象に応じて作成されるプログラムである。ユーザプログラムは、国際規格IEC61131-3等で規定されるラダーダイアグラム(LD:Ladder Diagram)、ファンクションブロックダイアグラム(FBD:Function Block Diagram)、シーケンシャルファンクションチャート(SFC:Sequential Function Chart)、インストラクションリスト(IL:Instruction List)、ストラクチャードテキスト(ST:Structured Text)の5種類のプログラム言語のうちのいずれかの言語により記述される。
 本実施の形態のユーザプログラムは、ラダー言語により記述された、ラダーロジック回路(論理回路)またはラダーロジック回路の組み合わせにより表される演算の命令コードで記述される「ラダープログラム」である。
 ラダープログラムは、入力側母線512と出力側母線514との間に回路要素と接続線とを用いた論理回路(以下、単に「回路」ともいう)を梯子状に描いたラダー図510により表現される。図4は、ラダー図の一例である。
 回路要素は、入力信号に基づいてオン/オフされる接点540とオン/オフを出力するコイル560とを含む。以下では、オンしている状態を導通状態ともいい、オフしている状態を非導通状態ともいう。ラダー図510は、接点540およびコイル560といった回路要素を互いに接続線580で繋ぐことで描かれる。また、一の回路は、接点540を組み合わせて表現される論理演算を示す部分と、論理演算の結果を出力する出力部分とからなり、コイル560は出力部分に相当する。なお、回路要素は、所定の処理を一まとめにしたファンクションブロックを含み得る。
 接点540は、外部から入力される信号に基づいてオン/オフされる接点(以下、「実接点542」ともいう)と、ラダープログラム内の演算結果に基づいてオン/オフされる接点(以下、「中間接点544」ともいう)とを含む。
 図4に示す例では、ラダー図510は、実接点542として、センサ1~センサ5からの信号を受けてオン/オフされる接点(センサ1)~接点(センサ5)を含み、中間接点544として、コイル(A)~コイル(C)の出力結果を受けてオン/オフされる接点(A)~接点(C)を含む。なお、図4においては、便宜上、一部符号を省略している。また、図4においては、便宜上、一部回路を省略しており、「…」は回路を省略していることを示している。
 図4に示すラダープログラムは、5つの論理回路を含むラダー図510で表される。具体的には、ラダープログラムは、第1回路521、第2回路522、第3回路523、第4回路524および第5回路525を含むラダー図510で表される。
 コイル(A)は、第1演算51の演算結果を示す。また、接点(A)は、コイル(A)の出力結果を受けてオン/オフされる。すなわち、接点(A)は、コイル(A)の出力結果を示しているともいえ、言い換えると、接点(A)は、第1演算51の結果を示しているともいえる。
 コイル(B)は、中間接点544である接点(A)と、実接点542である接点(センサ3)との組み合わせからなる第2演算52の結果を示す。第2演算52は、第1演算51の結果を引用して実行される。
 コイル(C)は、中間接点544である接点(B)と、実接点542である接点(センサ4)との組み合わせからなる第3演算53の結果を示す。第3演算53は、第2演算52の結果を引用して実行される。また、第2演算52は、第1演算51の結果を引用して実行される。
 コイル(D)は、中間接点544である接点(C)と、実接点542である接点(センサ5)との組み合わせからなる第4演算54の結果を示す。第4演算54は、第3演算53の結果を引用して実行される。また、第3演算53は、第2演算52の結果を引用して実行される。また、第2演算52は、第1演算51の結果を引用して実行される。
 サポート装置200は、演算結果を示す中間接点544を含む回路を、中間接点544を含まない形式で表現することができる。中間接点544を含む回路を、中間接点544を含まない形式で表現することを、「展開」ともいう。図5は、展開の概要を示す図である。なお、図5のラダー図510が示すラダープログラムは、図4のラダー図510が示すラダープログラムと等しい。また、図5においては、便宜上、中間接点544を太線で示している。
 回路の展開は、中間接点544またはコイル560が選択された状態で所定の操作が受け付けられたときに、選択された中間接点544が受ける演算を示す回路または選択されたコイル560を含む回路に対して行われる。図5に示す例では、図4に示すコイル(D)が選択された状態で所定の操作が受け付けられ、第5回路525が中間接点544を含まない形式に展開される。
 入力側母線512から出力側母線514に向かって、順に第5回路525は展開される。具体的には、第5回路525の左端に位置する中間接点544である接点(C)から順に展開する。接点(C)は第3演算53の結果を示しているため、第3演算53に置き換えることができる。
 第3演算53に置き換わった後も、第3演算53は中間接点544である接点(B)を含むため、中間接点544が残る。そこで、次に、中間接点544である接点(B)が展開される。接点(B)は第2演算52の結果を示しているため、第2演算52に置き換えることができる。
 第2演算52に置き換わった後も、第2演算52は中間接点544である接点(A)を含むため、中間接点544が残る。そこで、次に、中間接点544である接点(A)が展開される。接点(A)は第1演算51の結果を示しているため、第1演算51に置き換えることができる。
 第1演算51に置き換わると、第5回路525は全て実接点542で表されることとなる。このように、中間接点544を含む回路を、中間接点544を含まない実接点542に展開することで、中間接点544を含む回路の出力結果と、外部から入力される信号との関係が分かり易い回路を得られる。
 <D.実行結果の表示方法>
 図6および図7は、ラダープログラムの実行結果が反映されたラダー図である。実行結果は、PLC100がラダープログラムを実行した結果と、サポート装置200内で実行されたシミュレーション結果とを含む。図6および図7において、実行結果の出力を太線で表す、いわゆるパワーフロー表示で示されている。また、図6および図7に示すラダー図510には、共通の実行結果が反映されている。図7においては、図6に示す回路Xを展開したものとする。また、図6においては、便宜上、一部回路を省略しており、「…」は回路を省略していることを示している。また、接点の上部に記載された信号のうち、「I」から始まる信号は外部からの信号を示し、「Q」から始まる信号はラダープログラム内の論理演算の結果を示すものとする。
 図6に示すラダー図510においては、接点(Q2)および接点(Q3)が導通状態となっていないこと(非導通状態であること)を把握することができるが、接点(Q2)および接点(Q3)がなぜ導通状態になっていないのかは、接点(Q2)および接点(Q3)が受ける信号を出力するコイルを含む回路に遡る必要がある。
 これに対して、図7に示すように、回路Xを実接点542だけで表すように展開することで、回路Xの実行が途中で止まってしまっている原因を容易に特定することができる。特に、回路Xを構成する要素が一繋がりで表現されているため、回路を追いやすい。その結果、回路が途中で止まってしまっている原因も要素を順に追っていくことで容易に特定することができる。
 <E.回路の最適化>
 サポート装置200は、回路を展開したときに、実接点542を組み合わせた論理回路から冗長な接点の組み合わせや、矛盾した接点の組み合わせを削除することができる。図8は、回路の最適化について説明するための図である。
 矛盾した接点の組み合わせとは、共通する信号を受ける互いに異なる種類の接点同士が直列に接続されている場合をいう。互いに異なる種類の接点とは、具体的には、入力信号がオンのときに導通するa接点と、入力信号がオフのときに導通するb接点とである。
 たとえば、回路X内の論理演算X1が示す回路には、I02からの信号がオンで導通する接点X1aと、I02からの信号がオフで導通する接点X1bとが直列に接続された箇所を含む。すなわち、I02からの信号がオンのときには接点X1aが導通するものの、接点X1bは導通しないため、論理演算X1を含む回路が導通することはない。そのため、論理演算X1を示す部分の回路は、回路Xの結果には影響を与えないため、論理演算X1を示す部分の回路を回路Xから削除できる。
 冗長な接点の組み合わせとは、共通する信号を受ける互いに共通する種類の接点同士が直列に接続されている場合や、共通する信号を受ける互いに異なる種類の接点同士が並列に接続されている場合をいう。
 たとえば、回路X内の論理演算X2が示す回路には、I04からの信号がオンで導通する接点X2aと、I04からの信号がオンで導通する接点X2bとが直列に接続された箇所を含む。すなわち、接点X2aと接点X2bとのうち、いずれか一方の接点を削除しても、回路Xの結果には影響を与えないため、接点X2aと接点X2bとのうち、いずれか一方を削除できる。
 また、回路X内の論理演算X3が示す回路には、I09からの信号がオンで導通する接点X3aと、I09からの信号がオフで導通する接点X3bとが互いに並列に接続されている。すなわち、I09からの信号がオンのときには接点X3aが導通し、I09からの信号がオフのときには接点X3bは導通するため、並列に接続された回路は実質的に意味を成していない。すなわち、接点X3aと接点X3bとを削除しても、回路Xの結果には影響を与えないため、接点X3aと接点X3bとを削除できる。
 図8の下方に示すラダー図は、結果に影響のない回路や接点を削除して最適化した後のラダープログラムである。図8に示すように、結果に影響のない回路や接点を削除することで、ラダープログラム全体を簡潔に表すことができる。また、簡潔に表されることにより、処理全体の流れがより分かり易くなり、また、処理が実行されない場合に原因を特定し易くなる。
 <F.表示の省略>
 図5,図7,および図8に示すように、回路を展開した場合、横に長い表示となってしまい、ディスプレイ214の表示領域に収まらない虞がある。サポート装置200は、展開した回路について、その回路の一部を省略して表示することができる。図9は、省略表示の一例である。
 具体的には、導通状態の接点と、導通状態の接点に接続された非導通状態の接点である接点(I19)と接点(I13)と、コイル(Q5)とを表示する一方、接点(I19)とコイル(Q5)との間、および接点(I13)とコイル(Q5)との間の要素を省略する。
 コイル(Q5)が駆動しない原因を特定する場合、回路の入力側から順に探索する。そのため、コイル(Q5)が駆動しない原因を特定する場合、まずは、接点(I19)および接点(I13)について調べられる。すなわち、接点(I19)より出力側に位置する接点および、接点(I13)より出力側に位置する接点については表示されなくとも、原因を特定するにあたっては影響がない。
 このように、必要な箇所のみ表示し、不要な箇所を表示しないようにすることで、表示する情報量が減り、ラダープログラムが機能していない原因をさらに容易に特定することができる。また、展開することによって、ラダー図510の横幅を狭くすることができ、その結果、ラダー図510全体をディスプレイ214に表示させ易くすることができる。
 <G.表示処理>
 図10は、表示処理のフローチャートである。CPU202は、光学記録媒体8に格納されて提供されるサポートプログラムに含まれる命令コードを読み出して表示処理を実行し、ディスプレイ214にラダー図510を表示する。なお、図10に示す表示処理においては、PLC100において実行されているラダープログラムの実行結果を表示するものとして説明する。
 ステップS1において、CPU202は、ラダー表示指示を検出したか否かを判定する。ラダー表示指示とは、ラダー図510をディスプレイ214に表示するための指示であって、ラダー図510を表示する直接的な指示と、ラダープログラムの実行結果を表示する指示とを含む。
 ラダー表示指示を検出していない場合(ステップS1においてNO)、CPU202は表示処理を終了する。ラダー表示指示を検出している場合(ステップS1においてYES)、CPU202は、ステップS2に処理を切り替える。
 ステップS2において、CPU202は、ラダープログラムを読み出す。ラダープログラムは、PLC100のCPUユニット10が備えるフラッシュメモリ等の記憶部に記憶されている。CPU202は、通信インターフェイス218を介してCPUユニット10の記憶部からラダープログラムを読み出す。なお、サポート装置200内で実行されたシミュレーション結果を表示したり、編集対象のラダープログラムを表示したりする場合、CPU202は、記憶部201からラダープログラムを読み出す。なお、ラダープログラムの実行結果を、ラダー図510とともに表示する場合、ステップS2において、CPU202は、ラダープログラムの実行結果も読み出す。
 ステップS3において、CPU202は、読み出したラダープログラムを示すラダー図と、実行結果とをディスプレイ214に表示する。CPU202は、ステップS3の処理を実行することで、図4および図6に示すように、回路が展開される前の態様のラダー図510をディスプレイ214に表示する。
 ステップS4において、CPU202は、中間接点544またはコイル560が選択されたか否かを判定する。選択されていないと判定した場合(ステップS4においてNO)、CPU202は、表示処理を終了する。選択されていると判定した場合(ステップS4においてYES)、CPU202は、処理をステップS5に切り替える。
 ステップS5において、CPU202は、展開指示を検出したか否かを判定する。展開指示は、予め定められた操作であって、ユーザによって設定される操作や、プログラムの提供者によって予め定められている操作であってもよい。
 展開指示を検出していないと判定した場合(ステップS5においてNO)、CPU202は、表示処理を終了する。展開指示を検出したと判定した場合(ステップS5においてYES)、CPU202は、処理をステップS6に切り替える。
 ステップS6において、CPU202は、実接点探索処理を行う。CPU202は、実接点探索処理を実行することで、選択された中間接点544が受ける演算を示す回路または選択されたコイルを含む回路を、中間接点544を含まない形式で表現するために実接点542を探索し、展開したラダープログラムを記憶部201に格納する。
 ステップS7において、CPU202は、記憶部201に格納されたラダープログラムを表示して処理を終了する。すなわち、ステップS7においては、図5または図7に示したような展開した回路が表示される。なお、表示方法は、展開する前の回路が表示されているウィンドウとは別のウィンドウに展開された回路を表示してもよく、また、展開する前の回路の表示を、展開後の回路の表示に更新してもよい。
 <H.実接点探索処理>
 図11は、実接点探索処理のフローチャートである。実接点探索処理は、選択された中間接点またはコイルが示す回路を、中間接点544を含まない回路に展開するための処理である。
 ステップS602において、CPU202は、コイルが選択されたか否かを判定する。より具体的には、CPU202は、ステップS4においてコイルが選択されたのか否かを判定する。コイルが選択されていないと判定した場合(ステップS602においてNO)、すなわち、中間接点544が選択された場合、CPU202は、ステップS604において、選択された中間接点544が示すコイルを参照して、ステップS606に進む。
 コイルが選択されていると判定した場合(ステップS602においてYES)、CPU202は、処理をステップS606に切り替える。
 ステップS606において、CPU202は、コイルが含まれる回路を記憶部201に格納する。
 ステップS608において、CPU202は、記憶部201に格納された回路に含まれる接点(N)を抽出する。なお、ステップS608において抽出した接点の数をn個とする。
 ステップS610において、CPU202は、接点(N)が全て実接点542であるか否かを判定する。全てが実接点542である場合(ステップS610においてYES)、処理を終了し、表示処理に戻る。実接点542以外の接点を含む場合(ステップS610においてNO)、すなわち、中間接点544を含む場合、CPU202は、処理をステップS612に切り替える。
 ステップS612において、CPU202は、m=1を代入する。ステップS612における処理では、複数の接点(N)のうちの一の接点(N)が選択される。m=1が代入されることで、1番目の接点(N)が選択される。
 ステップS614において、CPU202は、接点(N)は実接点542であるか否かを判定する。接点(N)が実接点542ではない場合(ステップS614においてNO)、すなわち、接点(N)が中間接点544である場合、CPU202は、ステップS616を実行した後、ステップS618に進む。接点(N)が実接点542である場合(ステップS614においてYES)、CPU202は、ステップS616を実行することなく、ステップS618に進む。
 ステップS616において、CPU202は、回路変更処理を行う。回路変更処理においては、接点(N)に換えて、接点(N)に対応するコイルを含む回路の論理演算を組み込んだ回路が記憶部201に格納される。
 ステップS618において、CPU202は、mを1加算する。すなわち、ステップS618において、着目する接点(N)が変更される。
 ステップS620において、CPU202は、mがn以下であるか否かを判定する。mがnを超えていると判断されるまで、CPU202は、ステップS614~ステップS618の処理を繰り返す。mがnを超えているということは、ステップS608において抽出された全ての接点(N)に対して、その接点(N)が実接点542であるか、あるいは、中間接点544であるかが判定され、中間接点544である場合には、中間接点544に換えて接点(N)に対応するコイルを含む回路が組み込まれ回路が記憶部201に格納されたことを意味する。
 mがnを超えていると判断された場合(ステップS620おいてYES)、CPU202は、ステップS608に進む。
 ステップS608において、CPU202は、再度接点(N)を抽出する。すなわち、ステップS616の回路変更処理により、記憶部201に格納された回路が変更されるため、CPU202は、変更された回路に対して、ステップS608~ステップS620の処理を行い、ステップS610において、接点(N)が全て実接点542であると判定するまでステップS608~ステップS620の処理を繰り返す。
 これにより、選択された中間接点に対応するコイルまたは選択されたコイルを含む回路が、中間接点544を含まない形式に展開される。
 <I.回路変更処理>
 図12は、回路変更処理のフローチャートである。回路変更処理は、接点(N)に対応するコイルを含む回路の論理演算を、接点(N)に換えて回路に組み込むための処理である。
 ステップS702において、CPU202は、接点(N)が示すコイルを含む回路(D)を生成する。
 ステップS704において、CPU202は、接点(N)がa接点であるか否かを判定する。すなわち、接点(N)は、回路(D)が導通したときにオンするa接点であるのか、あるいは、回路(D)が導通しないときにオンするb接点であるのかが判定される。
 接点(N)がa接点であると判定された場合(ステップS704においてYES)、CPU202は、処理をステップS706に切り替える。
 ステップS706において、CPU202は、記憶部201に格納された回路の接点(N)を、回路(D)のうちのコイルを含まない接点の組み合わせに変更して処理を終了する。
 接点(N)がa接点ではないと判定された場合(ステップS704においてNO)、すなわち、接点(N)がb接点であると判定された場合、CPU202は、処理をステップS708に切り替える。
 ステップS708において、回路(D)のコイルが受ける論理演算が示す論理表現を反転した回路(E)を生成する。
 ステップS710において、CPU202は、記憶部201に格納された回路の接点(N)を回路(E)に変更して処理を終了する。
 なお、接点(N)がb接点であるということは、接点(N)が示す回路(D)が非導通である場合に接点(N)がオンする。すなわち、回路(D)が示す論理表現を反転した回路(E)が導通する場合に接点(N)がオンするため、接点(N)がb接点である場合には、接点(N)を回路(E)に置き換えることで、処理内容を変更することなく展開することができる。
 ここで、図13を参照して、ステップS708において実行される論理表現の反転について説明する。図13は、論理表現の反転を説明するための図である。
 たとえば、図13に示す接点(f)が、対象となる接点(N)であるとする。接点(f)はb接点であるから、接点(f)がその結果を受ける回路(D)の論理表現を反転した回路(E)を生成する。
 回路(E)とは、回路(D)が導通するときに非導通となる回路であって、図13に示すように、ド・モルガンの法則に従って展開されることで生成される。
 ここで、b接点のように、対応するコイルが受ける論理演算の結果が偽のときにオンとなる接点については、b接点の代わりに、b接点に対応するコイルが受ける論理演算が示す回路を直接組み込むことができない。接点に対応するコイルが受ける論理演算が示す回路を直接組み込むことができないような接点を含む、展開の難しい論理回路についても展開をすることができ、展開することのできるラダープログラムの種類が増え、汎用性が高まる。
 <J.サポート装置のソフトウェア構成>
 図14を参照して、サポート装置200が備えるソフトウェア構成について説明する。図14は、サポート装置200のソフトウェア構成を示す模式図である。図14に示すソフトウェアに含まれる命令コードは、適切なタイミングで読出され、サポート装置200のCPU202へ提供されて実行される。また、図14に示すソフトウェアは、光学記録媒体8に格納されて提供されるサポートプログラムに含まれる。
 図14を参照して、サポート装置200には、OS240およびプログラミングアプリケーション250が実装される。サポート装置200ではOS240が実行され、プログラミングアプリケーション250を実行可能な環境が提供される。本実施の形態に係るサポート装置200を実現するためのサポートプログラムは、少なくともプログラミングアプリケーション250を含む。
 プログラミングアプリケーション250は、エディタ252と、コンパイラ254と、デバッガ256と、シミュレータ258と、GUI(Graphical User Interface)モジュール260と、展開モジュール262と、結果出力モジュール264と、最適化モジュール266と、データ格納部270とを含む。プログラミングアプリケーション250に含まれるそれぞれのモジュールは、典型的には、光学記録媒体8にサポートプログラムとして格納された状態で流通して、サポート装置200にインストールされる。
 エディタ252は、実行可能プログラム(ソースプログラム)を作成するための入力および編集といった機能を提供する。より具体的には、エディタ252は、ユーザがキーボード210やマウス212を操作してラダープログラム274のソースプログラムを作成する機能に加えて、作成したラダープログラム274の保存機能および編集機能を提供する。エディタ252は、作成したラダープログラム274をデータ格納部270に格納する。
 コンパイラ254は、ラダープログラム274のソースプログラムをコンパイルして、CPUユニット10で実行可能(オブジェクト)プログラム形式の実行可能プログラムを生成する機能を提供する。
 デバッガ256は、実行可能プログラム(ソースプログラム)に対してデバッグを行うための機能を提供する。このデバッグの内容としては、ソースプログラムのうちユーザが指定した範囲を部分的に実行する、ソースプログラムの実行中における変数値の時間的な変化を追跡する、といった動作を含む。すなわち、デバッガ256が提供する機能は、ラダープログラム274の実行結果を取得する機能を含む。
 シミュレータ258は、サポート装置200内にPLC1のCPUユニット10でのプログラムの実行をシミュレーションする環境を構築する。
 GUIモジュール260は、ラダープログラムをラダー図510として表示する機能を提供する。すなわち、前述したラダー図510は、GUIモジュール260によって提供される。GUIモジュール260は、操作部203が受け付けた操作、並びに、ラダープログラム274、プログラムの実行に必要な変数設定272およびオブジェクトに係るオブジェクト情報278に基づいてラダー図510を提供する。また、GUIモジュール260は、操作部203が受け付けた操作に応じて生成された展開後のラダープログラム276をラダー図510としてディスプレイ214に表示する。すなわち、GUIモジュール260は、本願発明のプログラム表示手段の機能を提供する。
 展開モジュール262は、操作部203が受け付けた操作に基づいて、中間接点544を含む回路を、中間接点544を含まない形式に展開する機能を提供する。また、展開モジュール262は、展開後のラダープログラム276をデータ格納部270に格納する機能を提供する。すなわち、展開モジュール262は、本願発明の展開手段の機能および、保存処理手段の機能を提供する。展開後のラダープログラム276は、中間接点544のような中間変数を含まないプログラムとなるため、展開前のラダープログラム276に比べてデータのサイズが小さくなる。このような展開後のラダープログラム276を保存しておくことで展開後のラダープログラム276をPLC100にダウンロードすることができる。その結果、PLC100のメモリの使用量を減らすことができる。
 結果出力モジュール264は、ラダープログラムの実行結果を受けて、論理回路の導通状態を出力する機能を提供する。すなわち、結果出力モジュール264は、本願発明の出力部の機能を提供する。具体的には、結果出力モジュール264は、シミュレータ258によって実行されたプログラムの実行結果や、デバッガ256によって得られたプログラムの実行結果を受けて、論理回路の導通状態を生成し、GUIモジュール260によって表示されている論理回路に生成した導通状態を反映する。これにより、図6~図9に示したパワーフロー表示が行なわれる。
 最適化モジュール266は、展開後のラダープログラム276から、矛盾した箇所、または冗長な箇所を削除する機能を提供する。すなわち、最適化モジュール266は、本願発明の最適化手段の機能を提供する。最適化モジュール266は、たとえば、展開後のラダープログラム276が表示された状態で操作部203が受け付けた操作に基づいて矛盾した箇所、または冗長な箇所を探索して削除してもよい。また、展開モジュール262によって、中間接点544を含む回路が中間接点544を含まない形式に展開されるときに、矛盾した箇所、または冗長な箇所を探索して削除するようにしてもよい。最適化モジュール266は、矛盾した箇所、または冗長な箇所を削除した後のラダープログラムをデータ格納部270に別途格納してもよく、また、展開後のラダープログラム276として保存してもよい。このように、最適化モジュール266が、矛盾した箇所、または冗長な箇所を削除した後のラダープログラムを保存しておくことで、簡潔になったラダープログラムをPLC100にダウンロードすることができる。その結果、PLC100のメモリの使用量を減らすことができ、また、処理を高速化することができる。
 データ格納部270には、ラダープログラム274、変数設定272、展開後のラダープログラム276、およびオブジェクト情報278が格納されている。
 §3 付記
 上述したような本実施の形態および変形例は、以下のような技術思想を含む。
 <構成1>
 制御対象を制御する制御装置において実行されるラダープログラムの作成を支援するサポート装置(200)であって、
 前記ラダープログラムを、複数種類の要素を組み合わせた論理回路(521,522,523,524,525,X)により表示するプログラム表示手段(260,260a)と、
 前記ラダープログラム内の演算結果を示す第1の種類の接点(544)を含む論理回路(520a)について、当該第1の種類の接点を含む論理回路に含まれる全ての当該第1の種類の接点を、当該第1の種類の接点が示す演算結果を得るための論理演算を外部から入力された信号を示す第2の種類の接点(542)を組み合わせた論理回路(520b)に展開する展開手段(262,262a)とを備える、サポート装置。
 <構成2>
 前記ラダープログラムの実行結果を受けて、当該ラダープログラムを示す論理回路の導通状態を出力する出力部(264)をさらに備える、構成1に記載のサポート装置。
 <構成3>
 前記プログラム表示手段は、前記展開手段によって得られた前記第2の種類の接点を組み合わせた論理回路について、導通状態の接点と、当該導通状態の接点に接続された非導通状態の接点(接点(I17),接点(I13))とを表示し、当該導通状態の接点に接続された非導通状態の接点から出力結果を示すコイルまでの間に位置する要素を表示しない、構成2に記載のサポート装置。
 <構成4>
 前記展開手段は、前記第1の種類の接点が偽の演算結果を受けて導通状態となるb接点である場合に、当該第1の種類の接点を、当該第1の種類の接点が受ける演算の論理表現を反転した演算を示す論理回路(回路(E))に換えることで、当該第1の種類の接点が示す演算結果を得るための論理演算を前記第2の種類の接点を組み合わせた論理回路に展開する、構成1~構成3のうちいずれか1に記載のサポート装置。
 <構成5>
 前記展開手段によって得られた前記第2の種類の接点を組み合わせた論理回路から矛盾する接点の組み合わせ(X1)を抽出し、当該矛盾する接点の組み合わせからなる回路を削除する最適化手段(266)をさらに備える、構成1~構成4のうちいずれか1に記載のサポート装置。
 <構成6>
 前記展開手段によって得られた前記第2の種類の接点を組み合わせた論理回路から冗長な接点の組み合わせ(X2,X3)を抽出し、当該冗長な接点の組み合わせに含まれる接点を削除する最適化手段(266)をさらに備える、構成1~構成4のうちいずれか1に記載のサポート装置。
 <構成7>
 前記展開手段によって得られた前記第1の種類の接点を組み合わせた論理回路を保存する処理を行う保存処理手段(262)をさらに備える、構成1~構成6のうちいずれか1に記載のサポート装置。
 <構成8>
 制御対象を制御する制御装置で実行されるラダープログラムの開発を支援するサポートプログラム(250)であって、
 前記サポートプログラムはコンピュータに、
  前記ラダープログラムを、前記ラダープログラム内の演算結果を示す第1の種類の接点を含む複数種類の要素を組み合わせた論理回路により表示するステップ(S3)と、
  前記第1の種類の接点を含む論理回路について、当該第1の種類の接点を含む論理回路に含まれる全ての当該第1の種類の接点を、当該第1の種類の接点が示す演算結果を得るための論理演算を外部から入力された信号を示す第2の種類の接点を組み合わせた論理回路に展開するステップ(S6)とを実行させる、サポートプログラム。
 今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。また、実施の形態および各変形例において説明された発明は、可能な限り、単独でも、組み合わせても、実施することが意図される。
 1 制御システム、8 光学記録媒体、10 CPUユニット、11 システムバス、14 I/Oユニット、12 電源ユニット、100 PLC、200 サポート装置、201 記憶部、202 CPU、203 操作部、206 RAM、210 キーボード、212 マウス、214 ディスプレイ、216 光学記録媒体読取装置、218 通信インターフェイス、250 プログラミングアプリケーション、252 エディタ、254 コンパイラ、256 デバッガ、258 シミュレータ、260 GUIモジュール、260a プログラム表示手段、262 展開モジュール、262a 展開手段、264 結果出力モジュール、266 最適化モジュール、270 データ格納部、272 変数設定、274 ラダープログラム、276 展開後のラダープログラム、278 オブジェクト情報、510 ラダー図、512 入力側母線、514 出力側母線、520a,520b 論理回路、540 接点、542 実接点、544 中間接点、560 コイル、580 接続線。

Claims (8)

  1.  制御対象を制御する制御装置において実行されるラダープログラムの作成を支援するサポート装置であって、
     前記ラダープログラムを、複数種類の要素を組み合わせた論理回路により表示するプログラム表示手段と、
     前記ラダープログラム内の演算結果を示す第1の種類の接点を含む論理回路について、当該第1の種類の接点を含む論理回路に含まれる全ての当該第1の種類の接点を、該第1の種類の接点が示す演算結果を得るための論理演算を外部から入力された信号を示す第2の種類の接点を組み合わせた論理回路に展開する展開手段とを備える、サポート装置。
  2.  前記ラダープログラムの実行結果を受けて、当該ラダープログラムを示す論理回路の導通状態を出力する出力部をさらに備える、請求項1に記載のサポート装置。
  3.  前記プログラム表示手段は、前記展開手段によって得られた前記第2の種類の接点を組み合わせた論理回路について、導通状態の接点と、当該導通状態の接点に接続された非導通状態の接点とを表示し、当該導通状態の接点に接続された非導通状態の接点から出力結果を示すコイルまでの間に位置する要素を表示しない、請求項2に記載のサポート装置。
  4.  前記展開手段は、前記第1の種類の接点が偽の演算結果を受けて導通状態となるb接点である場合に、当該第1の種類の接点を、当該第1の種類の接点が受ける演算の論理表現を反転した演算を示す論理回路に換えることで、当該第1の種類の接点が示す演算結果を得るための論理演算を前記第2の種類の接点を組み合わせた論理回路に展開する、請求項1~請求項3のうちいずれか1項に記載のサポート装置。
  5.  前記展開手段によって得られた前記第2の種類の接点を組み合わせた論理回路から矛盾する接点の組み合わせを抽出し、当該矛盾する接点の組み合わせからなる回路を削除する最適化手段をさらに備える、請求項1~請求項4のうちいずれか1項に記載のサポート装置。
  6.  前記展開手段によって得られた前記第2の種類の接点を組み合わせた論理回路から冗長な接点の組み合わせを抽出し、当該冗長な接点の組み合わせに含まれる接点を削除する最適化手段をさらに備える、請求項1~請求項4のうちいずれか1項に記載のサポート装置。
  7.  前記展開手段によって得られた前記第1の種類の接点を組み合わせた論理回路を保存する処理を行う保存処理手段をさらに備える、請求項1~請求項6のうちいずれか1項に記載のサポート装置。
  8.  制御対象を制御する制御装置で実行されるラダープログラムの開発を支援するサポートプログラムであって、
     前記サポートプログラムはコンピュータに、
      前記ラダープログラムを、前記ラダープログラム内の演算結果を示す第1の種類の接点を含む複数種類の要素を組み合わせた論理回路により表示するステップと、
      前記第1の種類の接点を含む論理回路について、当該第1の種類の接点を含む論理回路に含まれる全ての当該第1の種類の接点を、当該第1の種類の接点が示す演算結果を得るための論理演算を外部から入力された信号を示す第2の種類の接点を組み合わせた論理回路に展開するステップとを実行させる、サポートプログラム。
PCT/JP2019/030537 2018-08-08 2019-08-02 サポート装置およびサポートプログラム WO2020031903A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018149067A JP7070223B2 (ja) 2018-08-08 2018-08-08 サポート装置およびサポートプログラム
JP2018-149067 2018-08-08

Publications (1)

Publication Number Publication Date
WO2020031903A1 true WO2020031903A1 (ja) 2020-02-13

Family

ID=69414976

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/030537 WO2020031903A1 (ja) 2018-08-08 2019-08-02 サポート装置およびサポートプログラム

Country Status (2)

Country Link
JP (1) JP7070223B2 (ja)
WO (1) WO2020031903A1 (ja)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63223808A (ja) * 1987-03-12 1988-09-19 Hitachi Ltd 故障診断装置
JP2009122936A (ja) * 2007-11-14 2009-06-04 Fanuc Ltd 異常調査用表示機能を備えたシーケンスプログラムモニタ装置およびプログラマブルコントローラ
JP2015014934A (ja) * 2013-07-05 2015-01-22 三菱電機株式会社 メモリ制御装置及びメモリ制御方法
JP2016001377A (ja) * 2014-06-11 2016-01-07 富士電機株式会社 ラダー図合理性検査装置
JP2016004414A (ja) * 2014-06-17 2016-01-12 三菱電機株式会社 プログラム編集装置、方法、およびプログラム
JP2017188115A (ja) * 2016-04-04 2017-10-12 オムロン株式会社 プログラム作成支援装置、プログラム作成支援装置の制御方法、およびプログラム作成支援装置の制御プログラム

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09198110A (ja) * 1996-01-18 1997-07-31 Nissan Motor Co Ltd ラダーシーケンス回路の最適化方法
JP3449095B2 (ja) * 1996-02-01 2003-09-22 日産自動車株式会社 シーケンス回路の照合方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63223808A (ja) * 1987-03-12 1988-09-19 Hitachi Ltd 故障診断装置
JP2009122936A (ja) * 2007-11-14 2009-06-04 Fanuc Ltd 異常調査用表示機能を備えたシーケンスプログラムモニタ装置およびプログラマブルコントローラ
JP2015014934A (ja) * 2013-07-05 2015-01-22 三菱電機株式会社 メモリ制御装置及びメモリ制御方法
JP2016001377A (ja) * 2014-06-11 2016-01-07 富士電機株式会社 ラダー図合理性検査装置
JP2016004414A (ja) * 2014-06-17 2016-01-12 三菱電機株式会社 プログラム編集装置、方法、およびプログラム
JP2017188115A (ja) * 2016-04-04 2017-10-12 オムロン株式会社 プログラム作成支援装置、プログラム作成支援装置の制御方法、およびプログラム作成支援装置の制御プログラム

Also Published As

Publication number Publication date
JP7070223B2 (ja) 2022-05-18
JP2020024594A (ja) 2020-02-13

Similar Documents

Publication Publication Date Title
JP2006024006A (ja) テストケース生成装置、テストケース生成プログラム、モデルベース開発プログラム、ソースコード生成妥当性診断装置、ソースコード生成妥当性診断プログラム、およびモデルベース開発方法。
KR100808257B1 (ko) 임베디드 시스템 프로토타입 개발 지원 장치 및 방법
JP2017084082A (ja) シミュレーション装置、試験シナリオファイル作成方法、及び試験シナリオファイルを用いた試験方法
JP6550268B2 (ja) プログラム作成支援装置、プログラムおよび判別方法
KR102198204B1 (ko) 시뮬레이션 장치
JP2006330867A (ja) プログラム変更履歴管理システム及びこれに適用されるプログラム編集装置並びにプログラム
WO2020031903A1 (ja) サポート装置およびサポートプログラム
JP2005044316A (ja) シミュレーション支援ツールおよびラダープログラムの検証システムならびにプログラム製品
EP3734379A1 (en) Method and system for generating control programs in a cloud computing environment
JP5314959B2 (ja) 情報処理装置、及びその制御方法、コンピュータプログラム、記憶媒体
WO2020246097A1 (ja) サポート装置およびサポートプログラム
US20220291903A1 (en) Information processing device, recording medium, and support system
JP2008165324A (ja) プログラム作成支援装置
CN115080113A (zh) 项目代码检测方法和装置、可读存储介质、电子设备
JP4767309B2 (ja) 情報処理装置、情報処理方法、及びコンピュータプログラム
JP6483507B2 (ja) 制御プログラム作成装置、及び制御プログラムのデバッグ方法
CN112204480B (zh) 信息处理装置以及计算机可读记录介质
JP2005063425A (ja) シミュレーション支援ツールおよびラダープログラムの検証システムならびにプログラム製品およびテスト入力ラダープログラム生成方法ならびにラダープログラムの検証方法
WO2024135231A1 (ja) プログラム作成支援装置、プログラム作成支援装置の制御方法、およびプログラム作成支援装置の制御プログラム
JP2016181228A (ja) ソースコード演算装置およびソースコード演算方法
EP3982214A1 (en) Support device and support program
JP7208441B1 (ja) Fa制御テスト支援プログラム、fa制御テスト支援装置、fa制御テスト支援方法及びfa制御テスト支援システム
JP7447574B2 (ja) サポート装置、サポートプログラムおよびサポート方法
WO2020184195A1 (ja) ラダー図プログラム作成支援装置、ラダー図プログラム作成支援方法、およびラダー図プログラム作成支援プログラム
JP2023128052A (ja) 情報処理システム

Legal Events

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

Ref document number: 19848436

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19848436

Country of ref document: EP

Kind code of ref document: A1