Design assistance device, design assistance method and design assistance program product
By designing auxiliary devices to detect and extract the circuit module structure information in the ladder diagram program, the need to repeatedly input the same structural circuit is reduced, the problem of heavy burden in the ladder diagram program design is solved, and design efficiency is improved.
Patent Information
- Application Number
- CN202080015795.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-02-27
- Filing Date
- 2020-01-09
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2040-01-09
AI Technical Summary
In ladder diagram programming, multiple program component registrations are required when repeatedly inputting circuit program elements with the same structure, resulting in a greater burden on the designer.
The design auxiliary device detects the connection relationship of the circuit module, extracts and stores structural information, and reports it to the user as a candidate, reducing the need for repeated inputs and directly inserts it into the ladder diagram program.
It effectively reduces the burden on ladder diagram programmers, improves design efficiency, and avoids the tedious process of inputting circuits of the same structure multiple times.
Smart Images

Figure CN113518948B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a design assisting device, a design assisting method and a design assisting program product for assisting the design work of a ladder diagram program executed by a programmable logic controller (PLC) for sequence control. Background Art
[0002] Ladder programs are programs written in ladder language. In programming using ladder language, program elements such as contacts and coils that transmit control signals are arranged between two bus bars, and the connection relationship between each program element is specified to create a program. In addition, control signals are allocated to the internal memory of the PLC, which is called a "device".
[0003] Here, the ladder diagram program can be said to be a combination of a plurality of small circuits composed of a plurality of program elements. In addition, usually, among the small circuits constituting the ladder diagram program, there are a plurality of circuits having the same circuit structure, that is, the same connection relationship between the program elements constituting the circuit. In other words, in the design work of the ladder diagram program, the work of inputting the small circuits of the same structure multiple times is generated. Therefore, Patent Document 1 proposes a technology that can effectively input the small circuits of the same structure.
[0004] In the invention described in Patent Document 1, when a copy and paste operation of a plurality of program elements that have been input is generated, a plurality of program elements that are set as objects of pasting are stored in advance as history information. In addition, in the invention described in Patent Document 1, a plurality of program elements stored in advance are called, and after editing as needed, they are registered as program components. The registered program components can be used in subsequent editing operations of the ladder program. That is, the user who edits the ladder program can simultaneously input a plurality of program elements constituting the program components by pasting the registered program components into the ladder program.
[0005] Patent Document 1: Japanese Patent Application Publication No. 2011-113254 Summary of the invention
[0006] However, in the invention described in Patent Document 1, in order to repeatedly input a group of program elements having the same connection relationship (a plurality of program elements stored as history information), it is necessary to previously register the plurality of program elements as program components, which is labor-intensive.
[0007] The present invention has been made in view of the above-mentioned problems, and an object of the present invention is to obtain a design support device that can reduce the burden on a worker who designs a ladder program.
[0008] In order to solve the above-mentioned problems and achieve the purpose, the design assistance device of the present invention has: an operation receiving unit that receives an operation from a user; and a program creation unit that creates a ladder diagram program according to the operation received by the operation receiving unit. In addition, the design assistance device has: a circuit module extraction unit that extracts the established circuit module from the ladder diagram program when the circuit module is established by detecting that one end of a circuit including a plurality of program elements is connected to one of the two bus bars constituting the ladder diagram program and the other end of the circuit is connected to the other of the two bus bars, and when a predetermined condition is satisfied; and a circuit module storage unit that stores structural information representing the structure of the circuit module extracted by the circuit module extraction unit. In addition, the design assistance device has: a reporting unit that reports to the user the circuit module indicated by the structural information stored in the circuit module storage unit as a candidate for the circuit module to be inserted into the ladder diagram program.
[0009] Effects of the Invention
[0010] The design support device according to the present invention has the effect of reducing the burden on a worker who designs a ladder program. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 This is a diagram showing a configuration example of a design support device according to the first embodiment.
[0012] Figure 2 This is a diagram showing an example of a ladder program created by the design support device according to the first embodiment.
[0013] Figure 3 This is a diagram showing a configuration example of hardware for realizing the design support device according to the first embodiment.
[0014] Figure 4 This is a flowchart showing an example of the operation of the circuit module extraction unit of the design support device according to the first embodiment.
[0015] Figure 5 FIG. 1 is a first diagram for explaining the operation of the circuit module extraction unit.
[0016] Figure 6 FIG. 2 is a second diagram for explaining the operation of the circuit module extraction unit.
[0017] Figure 7 This is a diagram showing an example of a circuit module extracted by the circuit module extraction unit.
[0018] Figure 8 This is a diagram showing an example of circuit module information stored in the design support device according to the first embodiment.
[0019] Fig. 9 This is a diagram showing an example of a used equipment table stored in the design support device according to the first embodiment.
[0020] Fig.10 This is a flowchart showing an example of the operation of the design support apparatus according to the first embodiment for receiving input of a circuit module.
[0021] Fig.11 This is a diagram showing a first example of a ladder program creation screen.
[0022] Fig.12 This is a diagram showing a second example of a ladder program creation screen.
[0023] Fig.13 This is a diagram showing a third example of the ladder program creation screen.
[0024] Fig.14 This is a diagram showing a fourth example of the ladder program creation screen.
[0025] Fig.15 This is a flowchart showing an example of the operation of the design support device according to the first embodiment to search for a circuit module that satisfies a condition.
[0026] Fig.16 FIG. 1 is a first diagram for explaining the search operation of the circuit module.
[0027] Fig.17 FIG. 2 is a second diagram for explaining the search operation of the circuit module.
[0028] Fig.18 This is a diagram showing an example of the operation of inputting a circuit module in the design support device according to the second embodiment.
[0029] Fig.19 This is a diagram showing a configuration example of a design support device according to a third embodiment.
[0030] Fig. 20 This is a diagram showing a configuration example of a machine learning unit included in a design support device according to a third embodiment.
[0031] Fig.21 This is a flowchart showing an example of the operation of the design support apparatus according to the third embodiment to extract a circuit module and learn the input tendency of the circuit module.
[0032] Fig. 22 This is a flowchart showing an example of the operation of the design support device according to the third embodiment for receiving input of a circuit module. DETAILED DESCRIPTION
[0033] Hereinafter, a design support device, a design support method, and a design support program according to an embodiment of the present invention will be described in detail with reference to the drawings. However, the present invention is not limited to the embodiment.
[0034] Implementation method 1.
[0035] Figure 1 1 is a diagram showing a configuration example of a design support device according to Embodiment 1. Figure 1 As shown, the design support device 1 according to the first embodiment includes an operation receiving unit 10 , a control unit 20 , a storage unit 30 , and a display unit 40 .
[0036] The operation receiving unit 10 receives an operation from a user who designs a ladder program using the design supporting apparatus 1 .
[0037] The control unit 20 includes a program creation unit 21 , a circuit module extraction unit 22 , a reporting unit 23 , and a search unit 24 .
[0038] The program creation unit 21 creates a ladder program according to the contents of the operation received from the user by the operation receiving unit 10. For example, the program creation unit 21 Figure 2 Create a ladder program as shown. Figure 2 This is a diagram showing an example of a ladder program created by the design support device 1 according to the first embodiment. Figure 2 The ladder diagram program shown is composed of a contact 63, a contact 64, and a coil 65 sandwiched between a left bus 61 and a right bus 62. Devices (X0, X1, Y0) which are internal memories of the PLC are allocated to the program elements, namely, the contact 63, the contact 64, and the coil 65. The program creation unit 21 automatically allocates devices to each program element.
[0039] Hereinafter, the circuit composed of the contact 63, the contact 64 and the coil 65 is referred to as the circuit module 60. In this specification, a circuit composed of a plurality of program elements and connected to both of the two bus bars (the left bus bar 61 and the right bus bar 62) constituting the ladder diagram program, more specifically, a circuit composed of a plurality of program elements, i.e., a circuit forming one of the plurality of current paths formed between the left bus bar 61 and the right bus bar 62, is referred to as a circuit module.
[0040] The circuit module extraction unit 22 extracts a circuit module from the ladder diagram program created by the program creation unit 21, and generates circuit module information, which is information indicating the extracted circuit module. The circuit module information is stored in a circuit module storage unit 32 of the storage unit 30 described later. In addition, the circuit module extraction unit 22 generates information on devices used in each of a plurality of program elements included in the extracted circuit module. The information on the devices is stored in a used device storage unit 33 of the storage unit 30 described later.
[0041] When the operation receiving unit 10 receives the input start operation of the circuit module, the reporting unit 23 reports the inputtable circuit module, that is, the circuit module stored in the circuit module storage unit 32 of the storage unit 30, to the user. The reporting unit 23 reports to the user by displaying the circuit module stored in the circuit module storage unit 32 on the display unit 40. When reporting the circuit module to the user, the reporting unit 23 also displays the devices allocated to each program element constituting the circuit module on the display unit 40.
[0042] When the operation receiving unit 10 receives a circuit module search operation, the search unit 24 searches for a circuit module that satisfies a condition specified by the search operation from among the circuit modules indicated by the information stored in the circuit module storage unit 32 .
[0043] The storage unit 30 includes a program storage unit 31 , a circuit module storage unit 32 , and a used device storage unit 33 .
[0044] The program storage unit 31 stores the ladder program created by the program creation unit 21 .
[0045] The circuit module storage unit 32 stores information indicating the circuit modules extracted from the ladder program by the circuit module extraction unit 22 .
[0046] The used device storage unit 33 stores information on devices used in each of the plurality of program elements included in the circuit module extracted by the circuit module extraction unit 22, that is, devices as internal memories allocated to each of the plurality of program elements. The used device storage unit 33 is a used memory information storage unit.
[0047] The display unit 40 displays various screens for a user who uses the design supporting apparatus 1 .
[0048] Here, hardware for realizing the design support device 1 according to the first embodiment will be described. Figure 3 This is a diagram showing a configuration example of hardware for realizing the design support device 1 according to Embodiment 1. The design support device 1 is realized by a processor 101 , a storage device 102 , an input device 103 , and a display device 104 . Figure 3 The hardware shown is, for example, a personal computer. Figure 3 When the hardware shown is a personal computer, the design support device 1 is installed in a storage device of the personal computer by installing a program for operating the control unit 20 of the design support device 1. Figure 3 The storage device 102 shown is implemented by the processor 101 executing the installed program. Figure 1The program creation unit 21 , circuit module extraction unit 22 , report unit 23 , and search unit 24 are implemented by the processor 101 executing a program installed in the storage device 102 for operating the control unit 20 of the design support apparatus 1 .
[0049] The processor 101 is a CPU (Central Processing Unit, also known as a central processing unit, a processing unit, an arithmetic unit, a microprocessor, a microcomputer, a processor, a DSP (Digital Signal Processor)), etc. The storage device 102 is a non-volatile or volatile semiconductor memory such as a RAM (Random Access Memory), a ROM (Read Only Memory), a flash memory, a magnetic disk, etc. The storage device 102 stores programs for operating the processor 101 as the design support device 1 and various other data. The storage device 102 is also used as a working memory when the processor 101 executes various processes. In addition, the storage device 102 constitutes Figure 1 The storage unit 30 shown includes a program storage unit 31 , a circuit module storage unit 32 , and a used device storage unit 33 .
[0050] The input device 103 is a mouse, keyboard, touch panel, etc. Figure 1 The display device 104 is a liquid crystal monitor, a display, etc., and is composed of Figure 1 The display unit 40 is shown.
[0051] In addition, the above-mentioned program for operating as the control unit 20 of the design support device 1 is provided to the user in a state of being written on a recording medium such as a CD (Compact Disc)-ROM or a DVD (Digital Versatile Disc)-ROM, and installed in the storage device 102 by the user. In this case, the hardware that realizes the design support device 1 is a structure including a reading device for reading the program from the recording medium or an interface circuit for connecting the reading device. In addition, the above-mentioned program may be provided to the user via a communication line such as the Internet and then installed in the storage device 102.
[0052] Next, the operation of the design support device 1 , specifically, the operation of supporting the user in the task of designing a ladder program, will be described.
[0053] First, an overview of the actions of the design assistance device 1 to assist the user in designing a ladder diagram program is described. If the operation receiving unit 10 receives an operation to create a ladder diagram program from the user, the program creation unit 21 of the design assistance device 1 creates the ladder diagram program according to the received operation content. Creation here means that the program creation unit 21 updates the content of the ladder diagram program in the middle of the design according to the operation content received by the operation receiving unit 10. The circuit module extraction unit 22 monitors the status of the ladder diagram program created by the program creation unit 21. Then, if the circuit module extraction unit 22 finds a circuit module that has not been extracted in the ladder diagram program created (updated) by the program creation unit 21, it extracts the found circuit module and stores the information representing the extracted circuit module in the circuit module storage unit 32 of the storage unit 30. When the operation received by the operation receiving unit 10 from the user is an operation of inserting a circuit module into the ladder diagram program created by the program creating unit 21, the reporting unit 23 displays the circuit modules with high usage frequency among the circuit modules shown in the information stored in the circuit module storage unit 32 as candidates for the circuit modules to be inserted into the ladder diagram program on the display unit 40. When the operation receiving unit 10 receives an operation of selecting one of the candidates displayed on the display unit 40 from the user, the program creating unit 21 inserts the circuit module selected by the user into the ladder diagram program.
[0054] Next, the operation of the circuit module extraction unit 22 will be described. Figure 4 This is a flowchart showing an example of the operation of the circuit module extraction unit 22 of the design support device 1 according to the first embodiment.
[0055] The circuit module extraction unit 22 checks the state of the ladder program created by the program creation unit 21 at a predetermined timing, and determines whether the structure of the circuit module has been determined (step S11). The circuit module extraction unit 22 checks the state of the ladder program, for example, when the operation receiving unit 10 receives an operation from the user. The circuit module extraction unit 22 may also repeatedly check the state of the ladder program at a predetermined cycle.
[0056] use Figure 5 and Figure 6 An example of a method in which the circuit module extraction unit 22 determines whether the circuit module configuration has been determined will be described. Assume that a ladder program is created by the program creation unit 21 in accordance with an operation from a user, and an input Figure 5The state of the circuit module 73 shown in FIG. 1 is shown. After that, the program creation unit 21 continues to create the ladder program according to the operation from the user, and the contact 74 and the coil 75 are input, and they are connected to both the two bus bars 71 and 72, and the circuit module 76 is established. In this case, the circuit module extraction unit 22 determines that the structure of the circuit module 73 input immediately before the circuit module 76 is established has been determined. That is, the circuit module extraction unit 22 Figure 4 In step S11 shown, it is determined whether the circuit module is newly established. In addition, an example is shown in which the circuit module extraction unit 22 determines that the structure of the circuit module immediately before input is determined when a circuit module is newly established, but the determination method is not limited to this. The circuit module extraction unit 22 may also determine that the structure of the newly established circuit module is determined when a certain period of time has passed without performing any operation to change the structure of the circuit module, such as adding program elements or deleting program elements. In this case, the circuit module extraction unit 22 Figure 4 In step S11 shown, it is determined whether a certain time has passed since the last operation of changing the structure of the newly established circuit module. In addition, when an operation of saving the ladder program being created is performed, the circuit module extraction unit 22 determines that the structure of the last established circuit module has been determined.
[0057] When the structure of the circuit module is not determined, that is, when the new circuit module is not established (step S11: No), the circuit module extraction unit 22 proceeds to step S11.
[0058] When the structure of the circuit module has been determined (step S11: Yes), the circuit module extraction unit 22 extracts the circuit module with the determined structure (step S12). The circuit module extraction unit 22 then determines whether a circuit module with the same structure as the extracted circuit module has been extracted, that is, whether a circuit module with the same structure as the extracted circuit module has been extracted in the past (step S13). The circuit module extraction unit 22 determines whether a circuit module with the same structure as the circuit module with the determined structure has been extracted by checking the structure information stored in the circuit module storage unit 32. The structure information stored in the circuit module storage unit 32 refers to information indicating the structure of the circuit module.
[0059] When the circuit module extraction unit 22 has not extracted a circuit module having the same structure as the extracted circuit module (step S13: No), it generates structure information indicating the structure of the extracted circuit module (step S14). The circuit module extraction unit 22 further sets the extraction count of the extracted circuit module to 1, and stores it in the circuit module storage unit 32 in association with the structure information generated in step S14 (step S15). The extraction count indicates the number of times a circuit module having the same structure as the circuit module extracted by the circuit module extraction unit 22 is used in the ladder diagram program.
[0060] The circuit module extraction unit 22 extracts, for example, in step S12 Figure 7 In the case of the circuit module 81 of the structure shown in FIG. 1 , in steps S14 and S15, Figure 8 The circuit module information 83 shown in FIG. 8 is stored in the circuit module storage unit 32. The circuit module information 83 is configured to include structure information 83A and extraction times 83B. Figure 7 As shown, the structure information 83A defines the coordinates with the upper left corner of the circuit module 81 as the origin, the horizontal direction as the X-axis, and the vertical direction as the Y-axis, indicating which program element exists at which position on the XY coordinate plane. Figure 8 In the figure, for convenience of explanation, an example is shown in which the types and connection relationships of program elements arranged at each coordinate are represented by symbols, but the types of program elements may also be represented by numerical values or the like.
[0061] If the circuit module extraction unit 22 has already extracted a circuit module with the same structure as the extracted circuit module (step S13: Yes), the circuit module extraction unit 22 increments the number of times the circuit module with the same structure is extracted (step S16). Step S16 shows a specific example of the operation performed by the circuit module extraction unit 22. Figure 7 The circuit module 81 shown in FIG. Figure 8 The circuit module information 83 shown is stored in the circuit module storage unit 32. In this case, the circuit module extraction unit 22 increments the extraction count 83B of the circuit module information 83 in step S16.
[0062] After executing step S15 or S16, the circuit module extraction unit 22 stores information about the device used in the extracted circuit module, that is, information about the device assigned to each of the program elements included in the extracted circuit module, in the used device storage unit 33 (step S17). In step S17, the circuit module extraction unit 22 generates, for example, Fig. 9 The device table 85 shown is stored in the device storage unit 33. Fig. 9In the table, X0, X1, X2, X3, ..., Y0, Y1, Y2, Y3, ... represent devices. The '1' or '0' on the right side of the device is a flag associated with each device, indicating the usage status of the device. Fig. 9 In the example shown, the case of the flag '1' indicates that the device is used, and the case of the flag '0' indicates that the device is not used. Fig. 9 The content of the device table 85 shown in FIG. 8 is consistent with the content of the device table 85 extracted by the circuit module extraction unit 22. Figure 2 Therefore, in the device table 85, the flag associated with each of the device X0 assigned to the contact 63, the device X1 assigned to the contact 64, and the device Y0 assigned to the coil 65 is set to '1' indicating that they are in use. Fig. 9 After the used device table 85 is created, if a circuit module with a determined structure is further extracted, the created used device table 85 is updated in step S17. That is, the circuit module extraction unit 22 sets each flag associated with each device used in the extracted circuit module to '1'.
[0063] As described above, when the circuit module extraction unit 22 detects that a new circuit module is connected to both of the two bus bars, it is determined that the structure of the circuit module immediately adjacent to the two bus bars previously connected to both of the two bus bars has been determined, and circuit module information indicating the structure of the circuit module whose structure has been determined and the number of extractions is generated and stored in the circuit module storage unit 32. In addition, the circuit module extraction unit 22 generates a used device table as information on devices used in the circuit module whose structure has been determined, and stores it in the used device storage unit 33.
[0064] Next, the operation of the design support device 1 when receiving input of a circuit module from a user will be described. Fig.10 This is a flowchart showing an example of the operation of the design support device 1 according to the first embodiment for receiving input of a circuit module.
[0065] When the design support device 1 receives a start operation for inputting a plurality of program elements (a start operation for inputting a circuit module) from a user who creates a ladder program (step S21), the display unit 40 displays a circuit module that has been used many times as an input candidate (step S22).
[0066] In step S21, the design support device 1 is, for example, Fig.11 and Fig.12As shown, when the creation screen 91 of the ladder diagram program is displayed on the display unit 40, the operation receiving unit 10 receives the designated operation of the position of inputting the program element. Then, the design assisting device 1 displays a menu 92 on the display unit 40, and the menu 92 is used to select whether to input a single program element or multiple program elements. In the menu 92, "single element input" corresponds to the input of a single program element, and "multiple element input" corresponds to the input of multiple program elements (circuit modules). If the design assisting device 1 receives the operation of selecting "multiple element input", it executes step S22, as shown in FIG. Fig.13 As shown, a screen 93 for receiving a circuit module selection operation is displayed on the display unit 40. In step S22, the reporting unit 23 displays on the screen 93 the circuit modules with the highest number of uses among the circuit modules represented by the circuit module information stored in the circuit module storage unit 32. Fig.13 In the example shown, the four circuit modules with the highest number of uses are displayed on screen 93. In addition, when there are multiple circuit modules with the same number of uses, for example, the circuit module with the shortest elapsed time since the last use is given priority. In addition, when displaying screen 93 on display unit 40, reporting unit 23 assigns unused devices to each program element of each circuit module constituting an input candidate, and displays the assigned devices together with the program element. At this time, reporting unit 23 checks the used device table stored in used device storage unit 33, and assigns unused devices to program elements in ascending order. In addition, Fig.13 This is a display example when using devices X0, X1, and Y0. Fig.13 In the example shown, the four circuit modules with the highest number of uses are displayed, but the design support device 1 may display five or more circuit modules. In addition, the design support device 1 may receive an operation from the user to scroll the display of the screen 93, and upon receiving the operation, display circuit modules other than the four circuit modules with the highest number of uses on the screen 93.
[0067] Return to Fig.10 After executing step S22, the design support device 1 receives an operation from the user to select a circuit module from the input candidate circuit modules (step S23), and inserts the selected circuit module into the ladder diagram program (step S24). Fig.13 In the case of a circuit module displayed on the upper right of the screen 93, the program creation unit 21 of the design support device 1 inserts the selected circuit module into the position specified in the above step S21. As a result, the ladder program creation screen 91 is updated to Fig.14 The content shown.
[0068] Design aid 1 and according to Fig.10In parallel with the actions shown in the flowchart, Figure 4 In the design support device 1, if the circuit module is inserted in the above step S24, the circuit module extraction unit 22 determines that the structure of the circuit module has been determined, and executes Figure 4 In step S12 and subsequent steps, the number of times the circuit module with a determined structure is used is updated. In addition, when a circuit module is inserted in step S24, the circuit module extraction unit 22 determines that the structure of the circuit module immediately before the inserted circuit module is determined, and updates the number of times used.
[0069] In addition, the design support device 1 performs step S22 and sets Fig.13 When the screen 93 shown is displayed on the display unit 40 , it is possible to search for a circuit module that satisfies a condition specified by the user from among the circuit modules indicated by each circuit module information stored in the circuit module storage unit 32 .
[0070] Next, the operation of the design support device 1 to search for a circuit module that satisfies the conditions specified by the user from the circuit modules indicated by each circuit module information stored in the circuit module storage unit 32, that is, the circuit modules used in the past. The search unit 24 searches for a circuit module that satisfies the conditions specified by the user.
[0071] Fig.15 This is a flowchart showing an example of the operation of the design support device 1 according to the first embodiment to search for a circuit module that satisfies a condition.
[0072] The design support device 1 performs the above Fig.10 Step S22, Fig.16The screen 93 of the content shown is displayed on the display unit 40. At this time, the design support device 1 displays the search condition input area 94 on the lower left of the screen 93, and receives the input of the number of AND and OR of contacts from the user (step S31). After that, if it is detected that the search button 95 is pressed (step S32), the search unit 24 searches for circuit modules whose number of AND and OR of contacts meets the condition, that is, the number of AND and OR of contacts matches the number input received in step S31 (step S33). Specifically, the search unit 24 searches for circuit modules whose number of AND and OR of contacts meets the condition from the circuit modules shown in the circuit module information stored in the circuit module storage unit 32. When the search is completed, the search unit 24 notifies the report unit 23 of the search result. The report unit 23 updates the display of the input candidate of the circuit module according to the search result obtained by the search unit 24 (step S34). Specifically, the reporting unit 23 displays the circuit modules found by the search performed by the search unit 24, that is, the circuit modules with the highest number of uses among the circuit modules that satisfy the condition input in the above step S31, on the screen 93. For example, in the above step S31, when the condition "the number of contacts AND is 1, and the number of contacts OR is 1" is input, the reporting unit 23 updates the screen 93 to Fig.17 The content shown.
[0073] After that, the design support device 1 waits for selection of a circuit module from the input candidate displayed on the screen 93 or input of a search condition for the circuit module (the number of AND and OR of contacts). When the design support device 1 receives an operation from the user to select one of the input candidate circuit modules, the selected circuit module is inserted into the ladder diagram program (performs the search condition). Fig.10 In addition, when the search condition of the circuit module is input and the search button is pressed, the design support device 1 searches for a circuit module that meets the search condition from the circuit modules used in the past and updates the display of the screen 93 (performs the search). Fig.15 The processing of steps S31 to S34 shown in FIG.
[0074] As described above, with respect to the design assistance device 1 involved in the present embodiment, if the structure of the circuit module connected to the two buses of the ladder diagram program is determined, the circuit module with the determined structure is extracted from the ladder diagram program, and circuit module information is generated and saved, wherein the circuit module information indicates the structure of the extracted circuit module and the number of times the circuit module with the same structure as the extracted circuit module is extracted. In addition, when the design assistance device 1 receives a start operation for inputting a plurality of program elements, the circuit module with the highest number of uses among the circuit modules indicated in the circuit module information is reported to the user as an input candidate. If one of the reported circuit modules is selected, the design assistance device 1 inserts the selected circuit module into the ladder diagram program. According to the design assistance device 1 involved in the present embodiment, when a plurality of program elements are input simultaneously, since it is not necessary to componentize the plurality of program elements that are intended to be input simultaneously in advance, the burden on the operator who designs the ladder diagram program can be reduced.
[0075] Implementation method 2.
[0076] Next, the design support device according to the second embodiment will be described. The functional module structure of the design support device according to the second embodiment is the same as that of the design support device 1 according to the first embodiment (see Figure 1 ) In this embodiment, the parts different from the design support device 1 according to the first embodiment will be described.
[0077] The design support device according to the second embodiment performs a control operation when the ladder program creation screen 91 is displayed on the display unit 40 and the ladder program creation screen 91 is detected to be touched. Fig.18 In this case, the circuit modules with the highest number of uses are displayed as input candidates, as in Embodiment 1. In addition, the operation receiving unit 10 receives the touch input, and the reporting unit 23 displays the display for the touch input of the circuit module on the display unit 40.
[0078] The design assistance device involved in embodiment 2 is the same as the design assistance device 1 involved in embodiment 1, except that the display method of the input candidates of the circuit module and the selection method of the circuit module are made to correspond to the touch input. The design assistance device involved in embodiment 2 sets the insertion position of the circuit module to, for example, the position where the user initially touches the creation screen 91 of the ladder diagram program. Alternatively, the design assistance device involved in embodiment 2 may also receive the designation of the insertion position of the circuit module after the input circuit module is selected. In addition, the design assistance device involved in embodiment 2 may also select whether to input a single program element or to input a circuit module when it is detected that the creation screen 91 of the ladder diagram program is touched, and perform the input when the circuit module is selected. Fig.18 Display as shown.
[0079] Furthermore, the design support device according to the present embodiment can receive input operations similar to those of the first embodiment, in addition to receiving input of the circuit module by touch operation.
[0080] Thus, the design support device involved in the second embodiment is configured to receive input operation using a touch panel, and receive input of a circuit module through a touch operation. By performing input realized by a touch operation, the user can perform intuitive operation. In addition, the user can input a circuit module (a plurality of program elements) without performing multiple subtle finger movements as in the case of inputting a single program element.
[0081] Implementation method 3.
[0082] Next, the design assistance device involved in the third embodiment is described. As described above, in the design assistance device 1 involved in the first embodiment, if the input of the circuit module is received and the operation is started, a certain number of circuit modules with a high number of times input in the past (number of times used) are displayed on the display unit 40 as candidates for the input circuit modules. However, the circuit modules with a high number of times used do not necessarily include the circuit modules that the user wants to input. In addition, in the ladder diagram program, there are certain conditions for the circuit modules recorded after a certain circuit module, and it is possible that the circuit modules with a high number of times used do not meet the certain conditions. In this case, it is preferred to display the circuit modules that meet the certain conditions as input candidates, but it is difficult to determine the input candidates by the number of times used. Therefore, in the design assistance device involved in the present embodiment, the input tendency of the circuit module is learned by machine learning, and the input candidates of the circuit module are determined based on the learning results.
[0083] Fig.19 1 is a diagram showing a configuration example of a design support device according to Embodiment 3. The design support device 1a according to Embodiment 3 includes an operation receiving unit 10, a control unit 20a, a storage unit 30, and a display unit 40. Since the operation receiving unit 10, the storage unit 30, and the display unit 40 of the design support device 1a are the same as those of the design support device 1 according to Embodiment 1, description thereof will be omitted. The control unit 20a of the design support device 1a is a structure in which a machine learning unit 25 is added to the control unit 20 of the design support device 1 according to Embodiment 1, and the circuit module extraction unit 22 is replaced by a circuit module extraction unit 22a.
[0084] exist Fig.19In the drawings, the same reference numerals are given to the same components of the design support device 1a as those of the design support device 1 according to the first embodiment. The description of the same components as those of the design support device 1 according to the first embodiment is omitted.
[0085] The circuit module extraction unit 22a, like the circuit module extraction unit 22 of the design support device 1 according to the first embodiment, checks the state of the ladder program created by the program creation unit 21 at a predetermined timing, determines whether the structure of the circuit module has been determined, and extracts the circuit module when the structure has been determined. In addition, when the structure information of the extracted circuit module is not stored in the circuit module storage unit 32, the circuit module extraction unit 22a generates the structure information and stores it in the circuit module storage unit 32. However, unlike the circuit module extraction unit 22, the circuit module extraction unit 22a does not store the number of times the circuit module is extracted in association with the structure information in the circuit module storage unit 32. Therefore, the circuit module storage unit 32 of the design support device 1a according to the third embodiment only stores the structure information of the circuit module extracted by the circuit module extraction unit 22a.
[0086] Fig. 20 1 is a diagram showing a configuration example of a machine learning unit 25 included in the design support device 1 a according to Embodiment 3. The machine learning unit 25 includes a state observation unit 51 , a data acquisition unit 52 , and a learning unit 53 .
[0087] When a circuit module is inserted into the ladder diagram program, the state observation unit 51 observes the circuit module inserted last as a state variable. The insertion of the circuit module here is different from the insertion of the circuit module by inputting a plurality of program elements separately to establish the circuit module, and the insertion of the circuit module by using the state observation unit 51 in the first embodiment. Figure 10 to Figure 14 The insertion of a circuit module by selecting one of the candidates for the circuit module described above corresponds to both of them. In the following description, "insertion of a circuit module into a ladder program" is expressed as "input of a circuit module".
[0088] When a circuit module is input into the ladder program, the data acquisition unit 52 acquires data related to the input circuit module. The data related to the circuit module may be information uniquely indicating the input circuit module, such as configuration information of the circuit module or a management number of the circuit module.
[0089] The learning unit 53 learns the input tendency of the circuit module based on a data set created by combining the state variables observed by the state observation unit 51 and the data related to the circuit module acquired by the data acquisition unit 52. Here, the data set is data in which the state variables and the data related to the circuit module are associated with each other.
[0090] In addition, in the present embodiment, an example is described in which the control unit 20a of the design assisting device 1a has a machine learning unit 25, but the present invention is not limited to this structure. The machine learning unit 25 can be set as a functional unit independent of the control unit 20a, or can be implemented by a device different from the design assisting device 1a. In addition, the machine learning unit 25 can also be implemented by a device existing on a cloud server. In the case where the machine learning unit 25 is implemented by a device external to the design assisting device 1a, the design assisting device 1a sends the data observed by the above-mentioned state observation unit 51 and the data acquired by the data acquisition unit 52 to the device that implements the machine learning unit 25. In addition, the design assisting device 1a acquires the learning results in the device that implements the machine learning unit 25.
[0091] The learning unit 53 learns the input tendency of the circuit module through so-called supervised learning, for example, according to a neural network model. Here, supervised learning refers to a model in which a set of data of a certain input and result (label) is given to a learning device in large quantities, thereby learning the features existing in these data sets and inferring the results based on the input.
[0092] A neural network is composed of the following layers: an input layer composed of multiple neurons, an intermediate layer (hidden layer) composed of multiple neurons, and an output layer composed of multiple neurons. The intermediate layer may be one layer or more than or equal to two layers.
[0093] In a neural network, if data is input to the corresponding neurons in the input layer, each neuron multiplies the input data by a predetermined weight and inputs it to each neuron in the middle layer. Similarly, each neuron in the middle layer multiplies the input data by a predetermined weight and inputs it to each neuron in the output layer. Each neuron in the output layer outputs the data received from the middle layer. The output result varies according to the value of the weight multiplied by each neuron in the input layer and the middle layer. That is, the neural network learns by adjusting the weight multiplied by each neuron to the data in such a way that the difference between the output result and the supervisory data becomes smaller.
[0094] The neural network constituting the learning unit 53 involved in this embodiment learns the input tendency of the circuit module through supervised learning based on the combination of the circuit module input last time observed by the state observation unit 51 and the circuit module input this time acquired by the data acquisition unit 52. The circuit module input this time is the supervisory data. In addition, the observation object of the state observation unit 51 is set to the circuit module input last time, but the circuit modules input from the last time to a certain number of times before, for example, the circuit modules input from the last time to the circuit modules input 3 times before, that is, the input circuit modules of the past 3 times, can also be set as the observation object. By observing multiple input circuit modules, the input tendency of the circuit module can be learned more accurately.
[0095] In the learning of the neural network constituting the learning unit 53, specifically, if a state variable is input, the candidate of the circuit module that the user will input next is output. The number of candidates for the circuit module is set to 4, for example, as in Implementation 1. In addition, the circuit modules are arranged in order from the circuit modules that are expected to be most likely to be selected and output. Next, the outputted candidates for the circuit module and the circuit module acquired by the data acquisition unit 52 (the circuit module input this time) are compared, and based on the comparison result, the weights used in each neuron of the input layer and the intermediate layer of the neural network (the weights multiplied by the input data in each neuron) are adjusted. In the weight adjustment, the weights used in each neuron are adjusted so that the highest-ranking circuit module among the candidates for the circuit module, that is, the circuit module that is expected to be most likely to be selected, is consistent with the circuit module (supervisory data) input this time.
[0096] The learning unit 53 may also learn the input tendency of the circuit module according to the data set created for multiple design assisting devices 1a. In addition, the learning unit 53 may also obtain the data set from multiple design assisting devices 1a. Moreover, the design assisting device 1a that collects the data set may be added as an object or removed from the object in the middle. In addition, the learning unit 53, i.e., the machine learning device, which has learned the input tendency of the circuit module in relation to a certain design assisting device 1a may be installed in a different design assisting device 1a, and the input tendency of the circuit module in relation to the different design assisting device 1a may be re-learned and updated.
[0097] In addition, as a learning algorithm used by the learning unit 53, deep learning (Deep Learning) that learns the extraction of feature quantities themselves can also be used, and machine learning can also be performed according to other well-known methods, such as genetic programming, functional logic programming, support vector machines, etc.
[0098] Next, the operation of the design support device 1 a will be described. Fig.21 This is a flowchart showing an example of the operation of the design support device 1 a according to the third embodiment to extract a circuit module and learn the input tendency of the circuit module.
[0099] Fig.21 The flowchart shown in the embodiment 1 is Figure 4 Steps S14 to S15 of the flowchart shown are replaced by steps S18 and S19. Steps S11 to S13 and S17 are the same as the operations of the same step numbers performed by the design support device 1 according to the first embodiment, and thus their description is omitted.
[0100] If the circuit module extracting unit 22a of the design supporting device 1a has not extracted a circuit module having the same structure as the circuit module extracted in step S12 (step S13: No), it generates structure information indicating the structure of the extracted circuit module and stores it in the circuit module storage unit 32 (step S18).
[0101] Next, the design support device 1a learns the input tendency of the circuit module based on the circuit module extracted in step S12 and the circuit module input in the past (step S19). In step S19, the machine learning unit 25 sets the circuit module input in the past, i.e., the input circuit module in the past n times (n is an integer greater than or equal to 1) as a state variable, and sets the extracted circuit module, i.e., the circuit module input this time, as supervisory data, to learn the input tendency of the circuit module.
[0102] If the circuit module extraction unit 22a has already extracted a circuit module having the same structure as the circuit module extracted in step S12 (step S13: Yes), step S18 is not executed. In this case, step S19 is executed after step S13.
[0103] Next, the operation of the design support device 1 a when receiving input of a circuit module from a user will be described. Fig. 22 This is a flowchart showing an example of the operation of the design support device 1 a according to the third embodiment for receiving input of a circuit module.
[0104] Fig. 22 The flowchart shown in the embodiment 1 is Fig.10 Step S22 of the flowchart shown is replaced by step S25. Since the steps other than step S25 are the same as the operations of the same step numbers performed by the design support device 1 according to the first embodiment, the description thereof will be omitted.
[0105] When the design support device 1a receives a start operation for inputting a plurality of program elements (an input start operation for a circuit module), the input candidate for the circuit module is displayed on the display unit 40 based on the learning result in the machine learning unit 25 (step S25). In this step S25, for example, the machine learning unit 25 determines the input candidate for the circuit module based on the learning result and the circuit module last input in the ladder diagram program, and then the reporting unit 23 displays the input candidate for the circuit module on the display unit 40. The design support device 1a can also receive the input of the circuit module by touch operation, similarly to the design support device 1 according to the second embodiment.
[0106] Thus, the design support device 1a according to the third embodiment learns the input tendency of the circuit module through machine learning based on the past input results of the circuit module, and determines the input candidate of the circuit module based on the learning result. Thus, compared with the first and second embodiments, the circuit module with a higher possibility of being selected can be reported to the user as the input candidate.
[0107] In addition, in the design support device 1a according to the present embodiment, instead of the number of times the circuit module is used in the design support device 1 according to the first embodiment, machine learning is used to determine the input candidates of the circuit module, but a configuration using both the number of times and machine learning may be used. For example, in the design support device 1a, if the learning performed by the machine learning unit 25 is insufficient, the input candidates of the circuit module may be displayed based on the number of times the circuit module is used, and if the learning is sufficient, the input candidates of the circuit module may be displayed based on the learning result. In addition, the user may select whether to display the input candidates of the circuit module based on the number of times the circuit module is used or to display the input candidates of the circuit module based on the learning result.
[0108] The structure shown in the above embodiment is an example of the content of the present invention, and may be combined with other well-known technologies. Without departing from the scope of the present invention, part of the structure may be omitted or changed.
[0109] Description of the label
[0110] 1, 1a design support device, 10 operation receiving unit, 20, 20a control unit, 21 program creation unit, 22, 22a circuit module extraction unit, 23 report unit, 24 retrieval unit, 25 machine learning unit, 30 storage unit, 31 program storage unit, 32 circuit module storage unit, 33 used equipment storage unit, 40 display unit, 51 state observation unit, 52 data acquisition unit, 53 learning unit.
Claims
1. A design assistance device, characterized in that: have: an operation receiving unit for receiving an operation from a user; a program creation unit that creates a ladder diagram program according to the operation received by the operation receiving unit; a circuit module extraction unit for extracting the circuit module having a determined structure from the ladder diagram program when it is detected that a circuit module is established by connecting one end of a circuit including a plurality of program elements to one of two bus bars constituting the ladder diagram program and connecting the other end of the circuit to the other of the two bus bars, and when it is determined that the structure of the circuit module has been determined; a circuit module storage unit that stores structure information indicating the structure of the circuit module extracted by the circuit module extraction unit; and A reporting unit reports to a user the circuit module indicated by the configuration information stored in the circuit module storage unit as a candidate for a circuit module to be inserted into the ladder program.
2. The design assistance device according to claim 1, characterized in that: The circuit module extraction unit extracts a circuit module that was established last time when a circuit module is newly established.
3. The design assistance device according to claim 1 or 2, characterized in that: The circuit module extraction unit extracts the newly established circuit module when a circuit module is newly established and no new circuit module is established after a certain period of time has passed.
4. The design assistance device according to claim 1 or 2, characterized in that: The circuit module extraction unit extracts the newly created circuit module when an operation of saving the ladder program is performed before extracting the newly created circuit module from the ladder program after the circuit module is newly created.
5. The design assistance device according to claim 1 or 2, characterized in that: The circuit module storage unit stores information on the number of times a circuit module having the same structure as the circuit module extracted by the circuit module extraction unit is used in the ladder diagram program in association with the structure information. The notification unit notifies a user of a certain number of circuit modules with a high number of times of use among the circuit modules indicated by the configuration information stored in the circuit module storage unit as the candidates.
6. The design assistance device according to claim 1 or 2, characterized in that: A machine learning unit is provided for learning the input tendency of the circuit module to the ladder program based on the circuit modules inserted into the ladder program in the past and the circuit modules newly inserted into the ladder program. The reporting unit reports the candidates to a user based on the learning result obtained by the machine learning unit.
7. The design assistance device according to claim 1 or 2, characterized in that: The notification unit notifies the candidate to a user based on an input tendency of a circuit module to the ladder program, the input tendency being learned based on circuit modules inserted into the ladder program in the past and circuit modules newly inserted into the ladder program.
8. The design assistance device according to claim 1 or 2, characterized in that: A search unit is provided for searching for a circuit module that satisfies a condition specified by a user among the circuit modules indicated by the configuration information stored in the circuit module storage unit, When the search unit performs the search, the reporting unit reports to a user the circuit module found by the search as a candidate for the circuit module to be inserted into the ladder program.
9. The design assistance device according to claim 1 or 2, characterized in that: A memory usage information storage unit is provided, which stores information on an internal memory allocated to each program element included in the circuit module extracted by the circuit module extraction unit. An unused internal memory is automatically allocated to each program element included in a circuit module reported to a user, and the reporting unit reports the allocated internal memory to the user in association with the program element.
10. The design assistance device according to claim 1 or 2, characterized in that: When a user selects one of the circuit modules reported by the reporting unit, the operation receiving unit receives the selection by a touch operation.
11. A design assistance method, which is executed by a design assistance device for assisting a design operation of a program, the design assistance method comprising: An operation receiving step is to receive the operation from the user; A program creation step, creating a ladder diagram program according to the operation received in the operation receiving step; A circuit module extraction step, in which, when a circuit module is established by detecting that one end of a circuit including a plurality of program elements is connected to one of two bus bars constituting the ladder diagram program and the other end of the circuit is connected to the other of the two bus bars, and it is determined that the structure of the circuit module is determined, the circuit module having the determined structure is extracted from the ladder diagram program; a storing step of storing structure information indicating the structure of the circuit module extracted in the circuit module extracting step in a circuit module storage unit; as well as A reporting step of reporting, to a user, the circuit module indicated by the configuration information stored in the circuit module storage unit as a candidate for a circuit module to be inserted into the ladder program.
12. A design assistance program product, characterized in that: Causes the computer to execute: An operation receiving step is to receive the operation from the user; A program creation step, creating a ladder diagram program according to the operation received in the operation receiving step; A circuit module extraction step, in which, when a circuit module is established by detecting that one end of a circuit including a plurality of program elements is connected to one of two bus bars constituting the ladder diagram program and the other end of the circuit is connected to the other of the two bus bars, and it is determined that the structure of the circuit module is determined, the circuit module having the determined structure is extracted from the ladder diagram program; a storing step of storing structure information indicating the structure of the circuit module extracted in the circuit module extracting step in a circuit module storage unit; as well as A reporting step of reporting, to a user, the circuit module indicated by the configuration information stored in the circuit module storage unit as a candidate for a circuit module to be inserted into the ladder program.
Citation Information
Patent Citations
Ladder diagram-editing device and ladder diagram-editing program
JP2011113254A
Sequence program component creation program and sequence program component creation device
CN105074592A
Program development supporting apparatus, program development supporting method, and program development supporting program
CN107885898A