Computer-readable recording medium, FA control test assisting device, FA control test assisting method, and FA control test assisting system

By setting a command in the routine of the program described by the FA control programming language as the minimum unit, and generating a test program based on the partial information of the test object and the partial information of the variable definition, the problem of the inability to effectively test the program described by the FA control programming language in the prior art is solved, and efficient testing efficiency is achieved.

CN117642727BActive Publication Date: 2025-03-07MITSUBISHI ELECTRIC CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202180100104.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-03-07
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

It is difficult to effectively test programs described in FA control programming languages ​​in the prior art, especially since most FA control programming languages ​​describe programs without a subroutine, resulting in the inability to generate a test program for the main routine, and the test items are restricted.

Method used

By setting a command in the routine of the program to the minimum unit, the test program is generated based on the specified test object partial information and variable definition partial information, thereby achieving efficient testing of programs described in the FA control programming language.

Benefits of technology

It improves the testing efficiency of programs described by the FA control programming language, and the items that can be tested are not limited, reducing the amount of work and analysis time of generating test programs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117642727B_ABST
    Figure CN117642727B_ABST
Patent Text Reader

Abstract

In an FA control test support device (100) as an example of a computer installed with an FA control test support program, a test object part information designation unit (112) designates test object part information from a program by using one of a plurality of commands constituting a routine of the program as a minimum unit. A variable definition part information extraction unit (113) extracts variable definition part information from the program. A test program generation unit (130) generates a test program based on the test object part information and the variable definition part information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a computer-readable recording medium storing an FA control test auxiliary program, an FA control test auxiliary device, an FA control test auxiliary method and an FA control test auxiliary system. Background Art

[0002] Currently, there are known devices and systems that assist in testing a program executed by a computer by automatically generating a test program for testing the program. Patent document 1 discloses a program management device that automatically generates a test program for confirming the operation of a subroutine specified by a keyboard from a program written in a programming language such as C language, FORTRAN, or COBOL.

[0003] In addition, Patent Document 2 discloses an auxiliary device that automatically performs a separate test on a function that is a test object in a source file written in an object-oriented language. In addition, Patent Document 3 discloses a test auxiliary system that generates test code that tests each method that is a test object in a program written in a programming language such as Java (registered trademark) and .NET. In addition, since the "subroutine" in Patent Document 1, the "function" in Patent Document 2, and the "method" in Patent Document 3 are terms used with the same meaning, they will be recorded as "subroutine" in the following.

[0004] Patent Document 1: Japanese Patent Application Laid-Open No. 08-212105

[0005] Patent Document 2: Japanese Patent Application Publication No. 2003-177942

[0006] Patent Document 3: Japanese Patent Application Publication No. 2007-115071 Summary of the invention

[0007] In the structures described in Patent Documents 1 to 3, since a test program is generated that sets a subroutine of a program described in a common programming language as the minimum unit of testing, there is a problem that the items that can be tested are limited according to the content of the subroutine. In addition, in the structures described in Patent Documents 1 to 3, it is not envisaged to test a program described in a FA control programming language such as a ladder diagram language or ST language used for factory automation, so-called FA (Factory Automation) control. Most FA control programming languages ​​describe programs without defining subroutines. Therefore, in the structures described in Patent Documents 1 to 3, if an attempt is made to generate a test program for a program without a subroutine described in a FA control programming language, only a test program that tests the entire main routine can be generated, and the items that can be tested are further limited. As a result, in the structures described in Patent Documents 1 to 3, there is a problem that a program described in a FA control programming language cannot be effectively tested.

[0008] The present invention has been proposed in view of the above-mentioned situation, and an object of the present invention is to improve the testing efficiency of a program written in an FA control programming language.

[0009] In order to achieve the above-mentioned purpose, the FA control test auxiliary program involved in the present invention enables a computer to function as the following units: a test object partial information specifying unit, which sets one of the multiple commands constituting the routine of the program written in the FA control programming language as the minimum unit, and specifies the information representing the part that becomes the test object, that is, the test object partial information, from the program; a variable definition partial information extraction unit, which extracts the variable definition partial information from the program, and the variable definition partial information is the information representing the part that defines the variables used in the part that becomes the test object; and a test program generation unit, which generates a test program based on the test object partial information and the variable definition partial information.

[0010] Effects of the Invention

[0011] According to the present invention, the FA control test auxiliary program sets one of the multiple commands constituting the routine of the program as the minimum unit of test, and generates a test program based on the test object partial information specified from the program. Therefore, the FA control test auxiliary program according to the present invention is less likely to be limited in the items that can be tested, compared with the FA control test auxiliary program that sets the subroutine of the program as the minimum unit of test and generates the test program based on the test object partial information specified from the program. Therefore, the FA control test auxiliary program according to the present invention can improve the test efficiency of the program described in the FA control programming language. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1This is a block diagram showing the configuration of the FA control test support system according to the first embodiment of the present invention.

[0013] Figure 2 This is a block diagram showing the functional structure of the FA control test support system according to the first embodiment.

[0014] Figure 3 This is a block diagram showing the hardware configuration of each device according to the first embodiment.

[0015] Figure 4 This is a diagram showing a display example 1 of an editing screen according to the first embodiment.

[0016] Figure 5 This is a diagram showing a display example 2 of the editing screen according to the first embodiment.

[0017] Figure 6 This is a diagram showing a display example 3 of the editing screen according to the first embodiment.

[0018] Figure 7 This is a diagram showing a display example 4 of the editing screen according to the first embodiment.

[0019] Figure 8 This is a diagram showing a display example 5 of the editing screen according to the first embodiment.

[0020] Fig. 9 This is an explanatory diagram of the test program related information involved in Implementation Example 1.

[0021] Fig.10 This is an explanatory diagram of the error cause information involved in Implementation Example 1.

[0022] Fig.11 This is a flowchart of the program editing process involved in the first embodiment.

[0023] Fig.12 This is a flowchart of the test program generation process involved in Implementation Example 1.

[0024] Fig.13 This is a flowchart of the test result information generation process involved in the first embodiment.

[0025] Fig.14 This is a block diagram showing the configuration of an FA control test support system according to Embodiment 2 of the present invention.

[0026] Fig.15 This is a block diagram showing the functional structure of the FA control test support system according to the second embodiment. DETAILED DESCRIPTION

[0027] Hereinafter, the FA (Factory Automation) control test support program, FA control test support device, FA control test support method and FA control test support system according to the embodiment of the present invention will be described in detail with reference to the accompanying drawings. In addition, in the drawings, the same or corresponding parts are marked with the same reference numerals.

[0028] Implementation Method 1

[0029] (About FA control test support system 1)

[0030] The FA control test support system 1 according to the first embodiment of the present invention is a system that supports testing of a program written in an FA control programming language such as a ladder diagram language or an ST language.

[0031] like Figure 1 As shown, the FA control test support system 1 includes an FA control test support device 100 as an example of a computer installed with an FA control test support program, the FA control test support program supporting the test of the program written in the FA control programming language. In addition, the FA control test support system 1 includes an FA control device 200 controlled by the program written in the FA control programming language.

[0032] In the FA control test support system 1, the FA control test support device 100 specifies the test object part information, which is information indicating the part to be tested, from the acquired program, generates a test program based on the specified test object part information, and outputs it to the FA control device 200. As a result, the FA control test support system 1 can test the program by executing the output test program by the FA control device 200, so that the FA control test support device 100 can assist in the test of the program.

[0033] (About FA control test support device 100)

[0034] The FA control test supporting device 100 is, for example, a computer device having a function as a server. Figure 2As shown, the FA control test assisting device 100 includes a program editing unit 110 for editing a program, and a test program editing unit 120 for editing a test program. In addition, the FA control test assisting device 100 includes a test program generating unit 130 for generating a test program, and a test program communicating unit 140 for communicating information related to the test program. In addition, the FA control test assisting device 100 includes a test result information generating unit 150 for generating information indicating a test result, i.e., test result information, and a test result information display unit 160 for displaying the test result information. In addition, the FA control test assisting device 100 includes a storage unit 170 for storing information related to the test of the program.

[0035] The program editing unit 110 includes a program editing screen display unit 111 that displays an editing screen of the program. In addition, the program editing unit 110 includes a test object part information designation unit 112 that designates test object part information. In addition, the program editing unit 110 includes a variable definition part information extraction unit 113 that extracts variable definition part information from the program, the variable definition part information being information indicating a part that defines variables used in a part that becomes a test object.

[0036] The test program editing unit 120 includes a test program editing screen display unit 121 for displaying an editing screen of the test program. In addition, the test program editing unit 120 includes an expected result information designation unit 122 for designating expected result information, which is information indicating the result expected by the user when the FA control device 200 executes the test program. In addition, the test program editing unit 120 includes a programming language information designation unit 123 for designating programming language information, which is information indicating the FA control programming language in which the test program is described. In addition, the test program editing unit 120 includes a usage information designation unit 124 for designating usage information, which is information indicating the usage of the test program. In addition, the test program editing unit 120 includes a test program related information management unit 125 for managing information related to the test program, which is test program related information. In addition, the test program editing unit 120 includes an export unit 126 for exporting the test program related information and an import unit 127 for importing the test program related information.

[0037] The test program communication unit 140 includes a test program output unit 141 that outputs a test program and an execution result information acquisition unit 142 that acquires an execution result of the test program.

[0038] The storage unit 170 includes a test program related information storage unit 171 for storing test program related information related to the test program, and an error cause information storage unit 172 for storing error cause information for identifying the cause of an execution error occurring during a test.

[0039] (About FA Control Device 200)

[0040] The FA control device 200 is a device including, for example, a PLC (Programmable Logic Controller) for controlling the FA equipment. The FA control device 200 includes a FA controller 210 as an example of a control unit and a FA equipment 220 as an example of a controlled unit. The FA controller 210 includes a test program acquisition unit 211 for acquiring a test program and a test program execution unit 212 for executing the test program. In addition, the FA controller 210 includes an execution result information output unit 213 for outputting execution result information, which is information indicating an execution result when executing the test program. The FA equipment 220 includes, for example, a servo amplifier 221 and a servo motor 222.

[0041] (About the Hardware Structure of the FA Control Test Support Device 100)

[0042] like Figure 3 As shown, the FA control test support device 100 includes a control unit 51 that executes processing according to a control program 59. The control unit 51 includes a CPU (Central Processing Unit). The control unit 51 performs processing according to the control program 59 as Figure 2 The variable definition part information extraction unit 113, the test program related information management unit 125, the export unit 126, the import unit 127, the test program generation unit 130, and the test result information generation unit 150 shown in FIG.

[0043] Back to Figure 3 The FA control test support device 100 includes a main storage unit 52 for loading a control program 59 and used as a work area of ​​a control unit 51. The main storage unit 52 includes a RAM (Random Access Memory).

[0044] In addition, the FA control test support device 100 has an external storage unit 53 that stores the control program 59 in advance. The external storage unit 53 supplies the data stored in the program to the control unit 51 according to the instruction of the control unit 51, and stores the data supplied from the control unit 51. The external storage unit 53 has a non-volatile memory such as a flash memory, a HDD (Hard Disk Drive), or a SSD (Solid State Drive). The external storage unit 53 is used as Figure 2 The storage unit 170 is shown to be functional.

[0045] Back to Figure 3The FA control test support device 100 includes an operation unit 54 operated by a user. The input information is supplied to the control unit 51 via the operation unit 54. The operation unit 54 includes information input components such as a keyboard, a mouse, and a touch panel. Figure 2 The test target part information specifying unit 112, the expected result information specifying unit 122, the programming language information specifying unit 123, and the application information specifying unit 124 are functional.

[0046] Return to Figure 3 The FA control test support device 100 includes a display unit 55 for displaying information inputted via the operation unit 54 and information outputted from the control unit 51. The display unit 55 includes a display device such as an LCD (Liquid Crystal Display) or an organic EL (Electro-Luminescence) display. Figure 2 The program editing screen display unit 111, the test program editing screen display unit 121, and the test result information display unit 160 shown in the figure function.

[0047] Return to Figure 3 The FA control test support device 100 has a transceiver 56 for transmitting and receiving information. The transceiver 56 has information communication components such as a communication network terminal device and a wireless communication device connected to the network. Figure 2 The test program output unit 141 and the execution result information acquisition unit 142 shown in the figure function.

[0048] Return to Figure 3 In the FA control test supporting device 100 , the main storage unit 52 , the external storage unit 53 , the operation unit 54 , the display unit 55 , and the transceiver unit 56 are all connected to the control unit 51 via the internal bus 50 .

[0049] The FA control test support device 100 uses the main storage unit 52, the external storage unit 53, the operation unit 54, the display unit 55, and the transceiver unit 56 as resources through the control unit 51, thereby realizing Figure 2 The functions of the above-mentioned units 111 to 113, 121 to 127, 130, 141, 142, and 150 to 170 are shown. For example, the FA control test support device 100 executes a program editing screen display step performed by the program editing screen display unit 111, a test object partial information designation step performed by the test object partial information designation unit 112, and a variable definition partial information extraction step performed by the variable definition partial information extraction unit 113.

[0050] In addition, for example, the FA control test support device 100 executes a test program editing screen display step performed by the test program editing screen display unit 121. In addition, for example, the FA control test support device 100 executes an expected result information designation step performed by the expected result information designation unit 122, and a use information designation step performed by the use information designation unit 124. In addition, for example, the FA control test support device 100 executes a test program associated information management step performed by the test program associated information management unit 125, an export step performed by the export unit 126, and an import step performed by the import unit 127.

[0051] In addition, for example, the FA control test support device 100 executes a test program generation step performed by the test program generation unit 130, a test program output step performed by the test program output unit 141, and an execution result information acquisition step performed by the execution result information acquisition unit 142. In addition, for example, the FA control test support device 100 executes a test result information generation step performed by the test result information generation unit 150, a test result information display step performed by the test result information display unit 160, and a storage step performed by the storage unit 170.

[0052] (About the Hardware Configuration of FA Control Device 200)

[0053] In addition, if Figure 3 As shown, the FA control device 200 also includes a control unit 51, a main storage unit 52, an external storage unit 53, an operation unit 54, a display unit 55, and a transceiver unit 56, similarly to the FA control test support device 100. The control unit 51 operates according to a control program 59. Figure 2 The FA controller 210 shown is functional. Return to Figure 3 FA control device 200 uses main storage unit 52, external storage unit 53, operation unit 54, display unit 55 and transceiver unit 56 as resources through control unit 51, thereby realizing the function of FA controller 210. For example, FA control device 200 executes a test program acquisition step performed by test program acquisition unit 211, a test program execution step performed by test program execution unit 212, and an execution result information output step performed by execution result information output unit 213.

[0054] (Details of Functional Configuration of FA Control Test Support Device 100)

[0055] Back to Figure 2 The test object partial information designation unit 112 designates the test object partial information from the program by using one of the plurality of commands constituting the routine of the program as the minimum unit. For example, the test object partial information designation unit 112 designates the test object partial information from the program displayed on the program editing screen (not shown). Figure 3The operation unit 54 shown specifies the information of the portion of the range selected by the user as the test object partial information. In addition, the test object partial information specifying unit 112 extracts the test object partial information from the program.

[0056] Here, in the present invention, the format of the description of the "program" includes not only the format of character data but also the format of graphic data. Therefore, "one of the multiple commands constituting the routine of the program" includes not only the command described in character data but also the command described in graphic data. Therefore, as for "one of the multiple commands constituting the routine of the program", for example, if it is ST language, it can be a statement in the source code, and if it is ladder diagram language, it can also be a rung in the ladder diagram. In addition, as for the "part of the range selected by the user" in this embodiment, for example, if it is ST language, it is greater than or equal to a statement in the source code, and if it is ladder diagram language, it is greater than or equal to a rung in the ladder diagram.

[0057] Return to Figure 2 The variable definition part information extraction unit 113 extracts variable definition part information from the program based on the test object part information, and the variable definition part information defines local variables used in the test object part, which is the part to be tested. In addition, the variable definition part information extraction unit 113 extracts variable definition part information from the program based on the test object part information, and the variable definition part information defines global variables used in the test object part.

[0058] The test program editing screen display unit 121 is Figures 4 to 8 The editing screen 300 of the test program shown in FIG. Figures 4 to 8 As shown, the editing screen 300 has an information selection section 310 for selecting information at the upper left end, and an information display section 320 for displaying the edited information at the right side of the information selection section 310. In the information selection section 310, a test object part selection tab 311 for selecting a test object part, a local variable selection tab 312 for selecting a local variable, a global variable selection tab 313 for selecting a global variable, a programming language selection tab 314 for selecting a programming language, an expected value selection tab 315 for selecting an expected value of expected result information, a purpose selection tab 316 for selecting a purpose, and a test program list selection tab 317 for selecting a list of test programs are provided in order from top to bottom.

[0059] For example, the editing screen 300 is displayed when the user uses Figure 3 When the test object part selection tab 311 is selected by the operation unit 54 as shown in FIG. Figure 4As shown, the information display unit 320 displays the test object partial information 321 specified by the test object partial information specifying unit 112. At this time, the information display unit 320 displays the test program name information 322 indicating the name of the test program and the automatic generation button 323 operated when starting to automatically generate the test program.

[0060] Here, if Figure 4 As shown, the test object part information 321 is, for example, information that can identify a string of source code such as "(... omitted before...)bEnable:=TRUE; (... omitted after...)". In addition, the test program name information 322 is information that can identify information corresponding to the item "Program Name" representing the test program, for example, information that can identify the name of the test program as "Servo ON". In addition, in the editing screen 300, by having the user edit the test object part information 321 and the test program name information 322 using the operating unit 54, the part that becomes the test object and the name of the test program can be added or changed. In addition, in the editing screen 300, the user can use the operating unit 54 to operate the automatic generation button 323.

[0061] In addition, for example, when the user selects the local variable selection tab 312 using the operation unit 54, the editing screen 300 is displayed. Figure 5 As shown, the variable definition information 324 of the local variables extracted by the variable definition information extraction unit 113 is displayed in a table format on the information display unit 320. At this time, a variable definition check button 325 for checking the variable definition information 324 is displayed on the information display unit 320.

[0062] Here, if Figure 5 As shown, the variable definition information 324 is information that can determine, for each local variable, information corresponding to the "variable name" indicating the name of the local variable, the "data type" indicating the data type of the local variable, the "initial value" indicating the initial value of the local variable, and the "description" item indicating the description of the local variable. The variable definition information 324 is, for example, information that can determine that the data type of a local variable named "iSpeed" is "INT", the initial value is "100", and the description is "speed". In addition, in the editing screen 300, the user can edit the variable definition information 324 using the operation unit 54, thereby adding and changing the local variable. In addition, in the editing screen 300, the user can operate the variable definition check button 325 using the operation unit 54.

[0063] Although not shown in the figure, for example, when the user selects the global variable selection tab 313 using the operation unit 54 in the editing screen 300, the variable definition information 324 of the global variable extracted by the variable definition information extraction unit 113 is displayed in a table format in the information display unit 320. At this time, a variable definition check button 325 is displayed in the information display unit 320. In addition, in the editing screen 300, the user can edit the variable definition information 324 using the operation unit 54, thereby adding and changing the global variable. In addition, in the editing screen 300, the user can operate the variable definition check button 325 using the operation unit 54.

[0064] In addition, for example, when the user selects the programming language selection tab 314 using the operation unit 54, the editing screen 300 is displayed. Figure 6 As shown, the FA control programming language that can generate the test program is displayed. At this time, the programming language information 326 indicating the FA control programming language is displayed in the information display unit 320.

[0065] Here, if Figure 6 As shown, the programming language information 326 is information that can identify the FA control programming language when generating the test program selected by the user. The programming language information 326 is information that can identify, for example, the meaning that "ST language" is selected from "ST language" and "ladder diagram language" as the FA control programming language when generating the test program. In addition, in the editing screen 300, the user can edit the programming language information 326 using the operation unit 54, thereby being able to specify the FA control programming language when generating the test program.

[0066] In addition, for example, when the user selects the expected value selection tab 315 using the operation unit 54, the editing screen 300 is displayed. Figure 7 As shown, the expected result information 327 is displayed in a table format on the information display unit 320. Here, the expected result information 327 is, for example, information that can determine the number "No." indicating the expected value and the "expected value conditional expression" indicating the conditional expression of the expected value for each output value from the FA device 220. For example, the expected result information 327 is information that can determine the conditional expression of the expected value of the number "1" as "feed current position = iSpeed ​​* iTime". In addition, in the editing screen 300, the user can specify the expected result information by editing the expected result information 327 using the operation unit 54.

[0067] Although not shown in the figure, for example, when the user selects the application selection tab 316 using the operation unit 54, the editing screen 300 displays the application information on the information display unit 320. Here, the application information is, for example, information that can identify the application of the test program, such as "servo ON", "servo OFF", "speed control", "positioning", "initial value setting", etc. In addition, in the editing screen 300, by editing the application information using the operation unit 54, the user can specify one application from a plurality of predefined applications.

[0068] In addition, for example, when the test program list selection tab 317 is selected using the operation unit 54, the editing screen 300 is displayed. Figure 8 As shown, information indicating a list of test programs, that is, test program list information 328 is displayed in a table format on the information display unit 320. In addition, at this time, a test program execution button 329 operated when executing the test program is displayed on the information display unit 320.

[0069] Here, if Figure 8 As shown, the test program overview information 328 is information that can determine, for each test program, information corresponding to the items "No." indicating the number of the test program, "Select" indicating whether to execute the test program, "Name" indicating the name of the test program, "Program information" indicating information of the test program, "Execution result" indicating the execution result of the test program, and "Error details" indicating the details of the error when an error occurs during the execution of the test program. In the test program overview information 328, for example, it can be determined that the test program numbered "1" is being executed when the test program execution button 329 is operated. In addition, in the test program overview information 328, for example, it can be determined that the name of the test program numbered "1" is "Servo ON", the execution result is "OK", and there is no execution error.

[0070] In addition, in the editing screen 300, the user can edit the test program overview information 328 using the operating unit 54, thereby specifying the test program to be executed when the test program execution button 329 is operated. In addition, in the editing screen 300, the user can edit the test program overview information 328 using the operating unit 54, thereby confirming various information of the test program and confirming the details of the execution error described later. In addition, in the editing screen 300, the user can operate the test program execution button 329 using the operating unit 54.

[0071] Return to Figure 2, the expected result information designation unit 122 designates information indicating the user's expected value of the output value from the FA device 220 when the FA controller 210 executes the test program and controls the FA device 220 as the expected result information 327. The expected result information 327 is information that can determine the conditional expression of the expected value as described above, and is therefore information that can determine the expected value when the test program is repeatedly executed for each number of executions. Figure 7 In the illustrated editing screen 300 , information determined by a conditional expression of an expected value input by the user using the operation unit 54 is designated as expected result information 327 .

[0072] Return to Figure 2 , the programming language information specifying unit 123 will be able to Figure 6 In the editing screen 300 shown, information identifying the FA control programming language selected by the user using the operation unit 54 is designated as programming language information 326 .

[0073] Return to Figure 2 The usage information designation unit 124 designates information that can identify the usage of the test program selected by the user using the operation unit 54 in the editing screen 300 as usage information.

[0074] The test program related information management unit 125 manages various test program related information for each test program. Fig. 9 As shown, the test program related information 350 includes test object information 321, variable definition information 324, programming language information 326, expected result information 327, purpose information 351, source information 352 indicating the source of the test program, and compilation information 353 indicating the result of compiling the test program. Figure 2 , the test program related information management unit 125 can obtain Figures 4 to 8 The edited information in the editing screen 300 shown is managed as new test program related information 350 . In addition, the test program editing screen display unit 121 can display the test program related information 350 managed by the test program related information management unit 125 on the editing screen 300 .

[0075] Return to Figure 2The export unit 126 exports the test program associated information 350 by causing the test program associated information 350 managed by the test program associated information management unit 125 to be stored in the test program associated information storage unit 171. In addition, the test program associated information management unit 125, for example, causes the export unit 126 to export the test program associated information 350 of the unedited and unexecuted test programs among the multiple test program associated information 350 managed. Specifically, the test program associated information management unit 125 causes Figure 8 The test program related information 350 of the selected test program which has not been edited or executed among the test programs displayed in the test program list information 328 of the editing screen 300 shown is exported.

[0076] Back to Figure 2 , the import unit 127 obtains the test program association information 350 stored in the test program association information storage unit 171 and outputs it to the test program association information management unit 125, thereby importing the test program association information 350. In addition, the test program association information management unit 125, for example, causes the import unit 127 to import the test program association information 350 of the test program to be edited or executed from the test program association information 350 stored in the test program association information storage unit 171. Specifically, the test program association information management unit 125 causes Figure 8 The test program related information 350 of the test program to be edited or the test program to be executed in the test program list information 328 displayed on the editing screen 300 shown is imported.

[0077] The test program generation unit 130 generates a test program based on the test object information 321, the variable definition information 324, the programming language information 326, the expected result information 327, and the application information 351 edited in the editing screen 300. Figure 4 When the user operates the automatic generation button 323 using the operation unit 54 in the editing screen 300 shown, generation of the test program starts.

[0078] First, the test program generation unit 130 determines whether the variable definition part defined by the local variables and global variables determined from the variable definition part information 324 is appropriate. In addition, even if the automatic generation button 323 is not operated, the test program generation unit 130 will Figure 5 In the editing screen 300 shown, when the user operates the variable definition check button 325 using the operation unit 54, it is also determined whether the local variables and the global variables are properly defined.

[0079] In addition, the test program generation unit 130 determines whether the conditional expression of the expected value determined by the expected result information 327 is appropriate. In addition, the test program generation unit 130 obtains all information required for the generation of the test program, such as the variable definition part information 324 and the test object part information 321 other than the expected result information 327, the programming language information 326, and the application information 351. In addition, the test program generation unit 130 generates a test object part described in the programming language determined by the programming language information 326 based on the test object part determined by the test object part information 321. At this time, if the programming language of the source program from which the test object part is extracted is the same as the programming language of the test program, the test program generation unit 130 sets the test object part determined by the test object part information 321 as the test object part of the test program.

[0080] In addition, the test program generation unit 130 generates a variable definition portion described in a designated programming language based on the variable definition portion determined by the variable definition portion information 324. At this time, if the programming language of the source program from which the variable definition portion is extracted is the same as the programming language of the test program, the test program generation unit 130 sets the variable definition portion determined by the variable definition portion information 324 as the variable definition portion of the test program.

[0081] The test program generation unit 130 generates a comparison processing portion in which a process of comparing an expected value based on a conditional expression of an expected value determined from the expected result information 327 and an output value from the FA device 220 is described in a designated programming language.

[0082] In addition, the test program generation unit 130 generates an execution result information generation part, which is a part that describes the processing of generating the execution result information in the specified programming language. Here, the execution result information is information that can determine a return value indicating "TRUE" when the FA controller 210 executes the test program without generating an execution error and the difference between the expected value and the output value does not exceed a predetermined threshold. In addition, the execution result information is information that can determine a return value indicating an error code when an execution error occurs when the FA controller 210 executes the test program. In addition, the execution result information is information that can determine a return value indicating "FALSE" when the FA controller 210 executes the test program without generating an execution error but the difference between the expected value and the output value exceeds the threshold.

[0083] In addition, the test program generation unit 130 generates an IF definition part that defines the IF (IntarFace) of the test program based on the purpose determined by the purpose information 351. In addition, the test program generation unit 130 combines the test object part, the variable definition part, the comparison processing part, the execution result information generation part, and the IF definition part to generate the source information 352 of the test program. Therefore, the part of the source of the test program determined by the source information 352 that is actually processed except the IF definition part is composed of the test object part, the variable definition part, the comparison processing part, and the execution result information generation part. In addition, the test program generation unit 130 compiles the source information 352 of the test program and temporarily stores the compiled information 353.

[0084] The test program output unit 141 outputs the compile information 353 of the test program to the FA controller 210 of the FA control device 200. Figure 8 When the user operates the test program execution button 329 using the operation unit 54 in the illustrated editing screen 300 , the compile information 353 of the test program is output to the test program output unit 141 .

[0085] Back to Figure 2 The execution result information acquisition unit 142 acquires the execution result information of the test program output from the FA controller 210 of the FA control device 200. In addition, after the test program compilation information 353 is output to the test program output unit 141, the test program related information management unit 125 causes the execution result information acquisition unit 142 to acquire the execution result information, and causes the test result information generation unit 150 to generate test result information based on the execution result information.

[0086] The test program related information storage unit 171 stores the test program related information derived from the deriving unit 126 for each test program. Fig. 9 The test program association information 350 shown is stored.

[0087] Back to Figure 2 , the error cause information storage unit 172 Fig.10 The error cause information shown is stored. Fig.10 As shown, the error cause information is, for example, information that can identify information corresponding to the items "classification" indicating the classification of the execution error, "code" indicating the error code of the execution error, and "details" indicating the detailed contents of the execution error for each execution error. For example, the error cause information is information that can identify the execution error with the error code "0A01" as an error classified as "1", and the detailed contents can be identified as "the JOG speed falls outside the setting range at the time of JOG start."

[0088] The test result information generation unit 150 generates test result information based on the execution result information. When the return value indicating "TRUE" is determined based on the execution result information, the test result information generation unit 150 generates test result information indicating "OK". In addition, when the return value indicating "FALSE" is determined based on the execution result information, the test result information generation unit 150 generates test result information indicating "NG". In addition, when the return value indicating an error code is determined based on the execution result information, the test result information generation unit 150 refers to the error cause information stored in the error cause information storage unit 172, determines the details corresponding to the error code, and generates test result information that can determine "NG" and the details of the execution error.

[0089] The test result information display unit 160 is Figure 8 The editing screen 300 shown displays test result information.

[0090] (Details of Functional Configuration of FA Control Device 200)

[0091] The test program acquisition unit 211 acquires the compile information 353 of the test program output from the FA control test support device 100 .

[0092] The test program execution unit 212 executes the test program using the compile information 353 .

[0093] The execution result information output unit 213 outputs the execution result information of the test program to the FA control test supporting device 100 .

[0094] (About program editing)

[0095] Next, the operation of the FA control test support device 100 extracting the test object information 321 and the variable definition information 324 from the program and displaying them on the test program editing screen 300 will be described using a flowchart. When the FA control test support device 100 displays the program editing screen (not shown), it starts executing Fig.11 First, the test target portion information specifying unit 112 determines whether a test target portion has been selected by the user from the program displayed on the editing screen (step S101).

[0096] When the test object part is not selected (step S101; N), the test object part information designation unit 112 repeats the process of step S101 until the test object part is selected. On the other hand, when the test object part is selected (step S101; Y), the test object part information designation unit 112 extracts the test object part information 321 from the program (step S102). Next, the variable definition part information extraction unit 113 extracts the variable definition part information 324 of the local variables used by the test object part from the program (step S103). Next, the variable definition part information extraction unit 113 extracts the variable definition part information 324 of the global variables used by the test object part from the program (step S104).

[0097] Next, the program editing unit 110 outputs the extracted test object partial information 321 and variable definition partial information 324 to the test program editing unit 120 (step S105). Then, the test program editing unit 120 displays the test object partial information 321 and variable definition partial information 324 on the test program editing screen display unit 121. Figure 4 and Figure 5 The test program editing screen 300 is displayed (step S106), and the processing ends.

[0098] (About test program generation processing)

[0099] Next, the operation of generating a test program by the FA control test support device 100 will be described using a flowchart. Figure 4 If the automatic generation button 323 is pressed in the test program editing screen 300 shown in FIG. 1 , the FA controls the test support device 100 to start executing the test program. Fig.12 The test program generation process shown. First, the test program generation unit 130 determines whether the local variables determined by the variable definition part information 324 are properly defined (step S201). When the local variables are correctly defined (step S201; Y), the test program generation unit 130 determines whether the global variables determined from the variable definition part information 324 are correctly defined (step S202). When the global variables are correctly defined (step S202; Y), the test program generation unit 130 determines whether the conditional expression of the expected value determined by the expected result information 327 is correct (step S203).

[0100] If the local variables are not correctly defined (step S201; N), or the global variables are not correctly defined (step S202; N), or the conditional expression of the expected value is incorrect (step S203; N), the test program generation unit 130 does not create a test program and ends the process. On the other hand, if the conditional expression of the expected value is appropriate (step S203; Y), the test program generation unit 130 obtains all the information required for the generation of the test program (step S204).

[0101] Next, the test program generation unit 130 generates a test object portion described in the programming language of the test program determined by the programming language information 326 based on the test object portion determined by the test object portion information 321 (step S205). Next, the test program generation unit 130 generates a variable definition portion described in the programming language of the test program based on the variable definition portion determined by the variable definition portion information 324 (step S206).

[0102] Next, the test program generation unit 130 generates a comparison processing part (step S207) and an execution result information generation part (step S208) based on the conditional expression of the expected value determined by the expected result information 327. Next, the test program generation unit 130 generates an IF definition part based on the purpose determined by the purpose information 351 (step S209). Next, the test program generation unit 130 combines the test object part, the variable definition part, the comparison processing part, the execution result information generation part, and the IF definition part to generate source information 352 (step S210). Then, the test program generation unit 130 compiles the source information 352 of the test program to generate compilation information (step S211), temporarily stores the compilation information 353 (step S212), and ends the processing.

[0103] (Regarding the test result information generation process)

[0104] Next, the operation of generating and displaying the test result information by the FA-controlled test support device 100 will be described using a flowchart. Figure 8 If the test program execution button 329 is pressed in the test program editing screen 300 shown in FIG. 1 , the FA controls the test support device 100 to start executing the test program. Fig.13 First, the test program related information management unit 125 determines whether the execution result information acquisition unit 142 has acquired the execution result information output from the FA controller 210 (step S301). If the test program related information management unit 125 has not acquired the execution result information (step S301; N), the test program related information management unit 125 repeats the process of step S301 until the execution result information is acquired.

[0105] On the other hand, when the test program related information management unit 125 obtains the execution result information (step S301; Y), the test program generation unit 130 generates the test result information based on the execution result information. Specifically, first, the test program generation unit 130 determines whether the return value indicating "TRUE" or "FALSE" is determined based on the execution result information (step S302). When the test program generation unit 130 determines the return value indicating "TRUE" or "FALSE" based on the execution result information (step S302; Y), it generates the test result information indicating "OK" or "NG" (step S303).

[0106] On the other hand, when the test program generation unit 130 does not determine a return value indicating "TRUE" or "FALSE" based on the execution result information (step S302; N), that is, when a return value indicating an error code is determined based on the execution result information, the test program generation unit 130 refers to the error cause information stored by the error cause information storage unit 172. In addition, the test program generation unit 130 determines the details corresponding to the error code based on the error cause information, and generates test result information that can determine "NG" and the details of the execution error (step S304). After the test program generation unit 130 generates the test result information, the test program associated information management unit 125 displays the test result information on the display unit 160 through the test result information display unit 160. Figure 8 The editing screen 300 of the test program shown is displayed (step S305), and the processing ends.

[0107] As described above, according to the FA control test support system 1 according to the present embodiment, in the FA control test support device 100, the test object part information designation unit 112 designates the test object part information 321 from the program using one of the plurality of commands constituting the routine of the program as the minimum unit. In addition, the variable definition part information extraction unit 113 extracts the variable definition part information 324 of the variables used in the test object part from the program. In addition, the test program generation unit 130 generates a test program based on the test object part information 321 and the variable definition part information 324. In addition, the test program output unit 141 outputs the test program to the FA control device 200. In addition, in the FA control device 200, the test program execution unit 212 can execute the test program through the FA controller 210 to control the FA device 220.

[0108] Thus, the FA control test support system 1 involved in the present embodiment is less likely to be limited in the items that can be tested compared to the FA control test support system that generates the test program based on the test object part information specified by the program by setting the subroutine of the program as the minimum unit of the test. Therefore, the FA control test support system 1 involved in the present embodiment can easily generate a test of any part of the program that the user wants to confirm. Therefore, the FA control test support system 1 involved in the present embodiment can reduce the cost such as the workload and operation time of generating the test program, and can reduce the time for analyzing the problems of the program. As a result, the FA control test support system 1 involved in the present embodiment can improve the test efficiency of the program described in the FA control programming language.

[0109] According to the FA control test support system 1 of the present embodiment, in the FA control test support device 100, the expected result information designation unit 122 Figure 7 The expected result information 327 shown in FIG. 1 is specified. Figure 4 The test object part information 321 is shown. Figure 5 The test program is generated based on the variable definition part information 324 and the expected result information 327 shown in FIG. 1 . In addition, in the FA control device 200, the execution result information that can identify the result of comparing the output value of the FA device 220 and the expected value when the test program is executed by the execution result information output unit 213 is output to the FA control test support device 100 through the FA controller 210. In addition, in the FA control test support device 100, the test result information generation unit 150 generates the test result information based on the execution result information, and the test result information display unit 160 displays the test result information.

[0110] Thus, in the FA control test support system 1 according to the present embodiment, the user can confirm the result of automatically determining whether the user can allow the difference between the output value of the FA device 220 and the expected value. Therefore, the FA control test support system 1 according to the present embodiment generates test result information based on the execution result information, and can reduce the time for analyzing the problem of the program compared to the FA control test support system that does not display. As a result, the FA control test support system 1 according to the present embodiment can improve the test efficiency of the program.

[0111] Here, as shown in the above-mentioned patent documents 1 to 3, in a program written in a general programming language, when a subroutine is repeatedly executed, the same output value is usually obtained from the same input value. Therefore, for a test program based on a subroutine of a program written in a general programming language, even if it is repeatedly executed with the same input value, the expected value of the output value does not change. However, when a test program based on a program written in an FA control programming language is repeatedly executed, the expected value of the output value of the FA device 220 may change even with the same input value.

[0112] For example, consider a program that includes a command to energize the servo motor 222 and output a command to start control, i.e., a servo ON command, to the servo amplifier 221. The execution result information of the test program generated based on the program is information that can determine the result of comparing the signal value indicating the state of servo ON or servo OFF, i.e., the output value, with the expected value, from the outside of the servo amplifier 221. In this case, the output value, i.e., the signal value indicating the state of servo ON or servo OFF, changes before and after the servo ON command is output. Therefore, the test program is repeatedly executed, for example, each time a predetermined period passes, and the expected value of the output value also changes. For example, in the test program, there is a possibility that the first expected value is servo OFF, the second expected value is servo ON, the third expected value is servo ON, and so on.

[0113] In addition, for example, consider a program that includes a command to drive the servo motor 222 to move the movable part (not shown) by 3 cm each time. The execution result information of the test program generated based on the program is information that can determine the result of comparing the cumulative value of the moving distance from the reference position, that is, the output value, with the expected value. In this case, the cumulative value of the moving distance increases each time the test program is executed. Therefore, by repeatedly executing the test program, the expected value of the output value also changes. Specifically, in this test program, the expected value for the first time is 3 cm, the expected value for the second time is 6 cm, the expected value for the third time is 9 cm, and so on.

[0114] However, as described in Patent Documents 1 to 3, it is not assumed that an output value that may change by repeated execution is compared with an expected value to generate a test program based on a subroutine of the program, so there is a problem that accurate execution result information cannot be obtained.

[0115] In contrast, according to the FA control test support system 1 of the present embodiment, the expected result information 327 used when generating the test program is information that can determine the expected value of the output value of the FA device 220 that may change when the test program is repeatedly executed for each number of executions. In addition, the generated test program execution result information is information that can determine the result of comparing the output value of the FA device 220 when the test program is repeatedly executed with the expected value for each number of executions.

[0116] Therefore, the FA control test support system 1 according to the present embodiment can compare the output value that changes for each execution number with the expected value even when the test program is repeatedly executed, and can obtain accurate execution result information.

[0117] Furthermore, according to the FA control test support system 1 according to the present embodiment, the test program generation unit 130 generates a comparison processing portion that compares the expected value based on the conditional expression of the expected value determined based on the expected result information with the output value from the FA device 220 .

[0118] Thus, the FA control test support system 1 according to the present embodiment can compare the output value with the expected value even if the source program does not have a command to obtain the output value of the FA device 220 by executing the test program including the comparison processing portion.

[0119] For example, if the program includes a command to output the servo ON instruction, the command to obtain the signal value indicating the servo ON or servo OFF state may not be included. In addition, for example, if the program includes a command to move the movable part 3 cm at a time, the command to obtain the cumulative value of the moving distance may not be included. Even in these cases, in the FA control test support system 1 involved in the present embodiment, if the variable definition part information 324 in which the variable indicating the output value such as the signal value and the cumulative value is added to the variable definition part and the expected result information 327 based on the expected value of the output value is used, then in the generated test program, the comparison processing part also includes a command to obtain the output value and compare it with the expected value. As a result, in the FA control test support system 1 involved in the present embodiment, even if the source program does not have a command to obtain the output value, the output value can be compared with the expected value.

[0120] According to the FA control test support system 1 of the present embodiment, in the FA control test support device 100 , the export unit 126 stores the test program related information 350 in the test program related information storage unit 171 . The import unit 127 acquires the test program related information 350 stored in the test program related information storage unit 171 .

[0121] Thus, in the FA control test support system 1 involved in the present embodiment, the user can reuse the test program association information 350 stored by the test program association information storage unit 171. As a result, the FA control test support system 1 involved in the present embodiment does not need to repeatedly create the test program association information 350, so compared with the FA control test support system that does not export and import the test program association information, it is possible to reduce costs such as the amount of work and the work time until the test program association information 350 can be used, and it is possible to reduce the time for analyzing program problems.

[0122] In addition, the FA control test support system 1 according to the present embodiment can thereby separate the task of creating a test program from the task of executing the test, and thus, for example, can distribute the work according to the task level of the person in charge of the test.

[0123] In addition, according to the FA control test support system 1 involved in this embodiment, in the FA control test support device 100, the usage information designation unit 124 designates the usage information 351, and the test program generation unit 130 generates a test program based on the test object part information 321, the variable definition part information 324 and the usage information 351.

[0124] Thus, the FA control test support system 1 according to the present embodiment can generate a test program that matches the purpose. As a result, the FA control test support system 1 according to the present embodiment can shorten the time required to create a test program for a standardized test item for each purpose, compared to a FA control test support system that generates a test program not based on the purpose information 351.

[0125] In addition, according to the FA control test assistance system 1 involved in this embodiment, in the FA control test assistance device 100, the programming language information designation unit 123 designates the programming language information 326, and the test program generation unit 130 generates a test program based on the test object part information 321, the variable definition part information 324 and the programming language information 326.

[0126] Thus, the FA control test support system 1 according to the present embodiment can generate a test program described in the FA control programming language selected by the user. As a result, the FA control test support system 1 according to the present embodiment can generate a test program described in the FA control programming language, for example, in which a source program in which a test object portion is extracted is described, and can generate a test program that can appropriately describe the content of the test in the FA control programming language.

[0127] Furthermore, according to the FA control test support system 1 according to the present embodiment, the test program generation unit 130 generates the source of the test program by combining the test object part, the variable definition part, the comparison processing part, the execution result information generation part, and the IF definition part.

[0128] Thus, the FA control test support system 1 according to the present embodiment can reduce the parts not required for the test from the source, and can reduce the amount of information of the test program, compared to the FA control test support system that generates the source of the test program without combining these parts. As a result, the test program related information management unit 125 can reduce the amount of information of the test program related information 350 managed, and can reduce the cost such as the temporary storage amount and the calculation load, thereby improving the manageability. In addition, in the test program related information storage unit 171, the amount of information of the stored test program related information 350 can be reduced, and the storage amount can be reduced.

[0129] Implementation Method 2

[0130] The FA control test support system 1 according to the first embodiment includes a FA control test support device 100 and a FA control device 200. However, the structure of the FA control test support system 1 is not limited thereto as long as the FA control test support device 100 can support the test of the program for controlling the FA control device 200. For example, the test program can be executed not only by the actual FA control device 200 but also by a virtual FA control device. Fig.14 , Fig.15 , the FA control test support system 1 according to Embodiment 2 will be described in detail. In Embodiment 2, the configuration different from that of Embodiment 1 will be described, and the configuration identical to that of Embodiment 1 will be omitted as it is redundant.

[0131] (About FA control test support system 1)

[0132] like Fig.14 As shown, in the FA control test support system 1 according to the second embodiment of the present invention, a FA control device simulator 400 which is a simulator of the FA control device 200 is provided instead of the FA control device 200 .

[0133] (About FA control device simulator 400)

[0134] like Fig.15As shown, the FA control device simulator 400 includes, for example, a FA controller simulator 410 which is a simulator of the FA controller 210, and a FA device simulator 420 which is a simulator of the FA device 220. The FA controller simulator 410 includes a test program acquisition unit 211, a test program execution unit 212, and an execution result information output unit 213. In addition, the FA device simulator 420 includes, for example, a servo amplifier simulator 421 which is a simulator of the servo amplifier 221, and a servo motor simulator 422 which is a simulator of the servo motor 222.

[0135] (About the Hardware Configuration of the FA Control Device Simulator 400)

[0136] In addition, regarding the hardware configuration of the FA control device simulator 400 according to the present embodiment, if the "FA control device 200" is replaced with the "FA control device simulator 400" and the "FA controller 210" is replaced with the "FA controller simulator 410", the description is the same as that of Embodiment 1. Therefore, in the present embodiment, the detailed description is omitted to reduce redundant descriptions.

[0137] (Details of Functional Configuration of FA Control Test Support Device 100)

[0138] In the present embodiment, the test program output unit 141 outputs the compile information 353 of the test program to the FA controller simulator 410. In addition, the execution result information acquisition unit 142 acquires the execution result information of the test program output from the FA controller simulator 410.

[0139] The details of other functional configurations of the FA control test support device 100 according to the present embodiment are the same as those of the first embodiment. Therefore, in the present embodiment, the detailed description is omitted to reduce redundant descriptions.

[0140] As described above, according to the FA control test support system 1 according to the present embodiment, in the FA control test support device 100, the test program output unit 141 outputs the test program to the FA control device simulator 400. In addition, in the FA control device simulator 400, the test program execution unit 212 can execute the test program to control the FA device 220 through the FA controller simulator 410.

[0141] In addition, the FA controller simulator 410 outputs the execution result information that can identify the result of comparing the output value of the FA device 220 and the expected value when the test program is executed by the execution result information output unit 213 to the FA control test support device 100. In addition, in the FA control test support device 100, the test result information generation unit 150 generates the test result information based on the execution result information, and the test result information display unit 160 displays the test result information.

[0142] Therefore, in the FA control test support system 1 according to the present embodiment, the FA control device simulator 400 can obtain and execute the test program instead of the FA control device 200 according to the present embodiment, and output the execution result information to the FA control test support system 100. In addition, the FA control test support system 1 according to the present embodiment achieves the same effects as the FA control test support system 1 according to the above-mentioned first embodiment.

[0143] [Example of Change]

[0144] In the second embodiment, the FA control device simulator 400 is a separate device from the FA control test support device 100, but the FA control device simulator 400 may be a device integrated with the FA control test support device 100. In this case, for example, the FA control test support device 100 may also realize the functions of the FA control device simulator 400 by a program. That is, the FA control test support device 100 may also realize the functions of the FA controller simulator 410 and the FA device simulator 420 by using the main storage unit 52, the external storage unit 53, the operation unit 54, the display unit 55, and the transceiver unit 56 as resources through the control unit 51.

[0145] Furthermore, as described in the first and second embodiments, it is preferred that the user can select the FA control programming language for describing the test program, but the user does not need to select the FA control programming language for describing the test program. For example, the FA control programming language for describing the test program may be predetermined.

[0146] In addition, as shown in the above-mentioned embodiments 1 and 2, it is preferred that the user can select the purpose of the test program, but the user may not select the purpose of the test program. In this case, for example, the test program generation unit 130 may also generate the test program based on the purpose inferred from the test object partial information 321, the variable definition partial information 324, and the expected result information 327. In addition, for example, the test program generation unit 130 may also generate the test program based on the test form when the purpose is not determined.

[0147] In addition, as shown in the above-mentioned embodiments 1 and 2, it is preferable that the test result information generating unit 150 generates the test result information based on the execution result information, and the test result information display unit 160 displays the test result information, but the test result information may not be generated or displayed. In this case, the user needs to confirm the execution result information output by the FA controller 210 and the FA controller simulator 410, confirm the result of controlling the FA device 220 and the FA device simulator 420, and analyze the test result.

[0148] In addition, as shown in the above-mentioned embodiments 1 and 2, the expected result information 327 is preferably information that can determine the expected value of the output value of the FA device 220 and the FA device simulator 420 that may change when the test program is repeatedly executed for each number of executions, but it is not limited to this. For example, when the output value of the FA device 220 and the FA device simulator 420 does not change even if the test program is repeatedly executed, the expected result information 327 may be information that can determine a single expected value for the output value. Specifically, the expected result information 327 may not be a conditional expression of the expected value, but may be a single expected value itself.

[0149] In addition, as shown in the above-mentioned embodiments 1 and 2, it is preferable that the test result information generating unit 150 can identify the details corresponding to the error code by referring to the error cause information, but the test result information generating unit 150 may not identify the details corresponding to the error code. In this case, the user needs to analyze the test result information, the control results of the FA device 220, and the FA device simulator 420 to identify the error cause corresponding to the detailed information.

[0150] In the above-mentioned embodiments 1 and 2, the test program generation unit 130 generates the IF definition part based on the purpose determined by the purpose information 351, but the part of the test program generated based on the purpose is not limited to this. For example, the test program generation unit 130 may also generate the comparison processing part based on the purpose determined by the purpose information 351 and the conditional expression of the expected value determined by the expected result information 327. In addition, for example, the test program generation unit 130 may also generate the execution result information generation part based on the purpose determined by the purpose information 351.

[0151] In addition, the central part of the processing performed by each device 100, 200, 400 having a control unit 51, a main storage unit 52, an external storage unit 53, an operation unit 54, a display unit 55, a transceiver unit 56, an internal bus 50, etc. is not limited to a dedicated system, and can be implemented using a general computer system. For example, the FA control test auxiliary program as a computer program for executing the above-mentioned actions can be stored in a computer-readable recording medium such as a flash memory, a DVD-ROM (Read-Only Memory), etc. and distributed, and the FA control test auxiliary program is installed to form a computer that executes the above-mentioned processing. In addition, the FA control test auxiliary program can be stored in advance in a storage device of a server device on a communication network such as a LAN (Local Area Network) or the Internet, and downloaded by a general computer system to form a computer.

[0152] In addition, when the functions of each device 100, 200, 400 are implemented by sharing between an OS (operating system) and an application program, or by cooperation between the OS and the application program, only the application program portion may be stored in a recording medium or a storage device.

[0153] In addition, the FA control test auxiliary program may be superimposed on a carrier wave and provided via a communication network. For example, the FA control test auxiliary program may be posted on a bulletin board (BBS, Bulletin Board System) on a communication network and provided via the network. Furthermore, the FA control test auxiliary program may be started and executed like other application programs under the control of the OS, thereby executing the above-mentioned processing.

[0154] The present invention can be set to various embodiments and variations without departing from the broad spirit and scope of the present invention. In addition, the above-mentioned embodiments are used to illustrate the present invention and are not intended to limit the scope of the present invention. That is, the scope of the present invention is not the embodiments, but is represented by the claims. Moreover, various variations imposed within the claims and within the scope of the disclosure equivalent thereto are considered to be within the scope of the present invention.

[0155] Description of the label

[0156] 1…FA control test support system, 50…internal bus, 51…control unit, 52…main storage unit, 53…external storage unit, 54…operation unit, 55…display unit, 56…transmitter and receiver unit, 59…control program, 100…FA control test support device, 110…program editing unit, 111…program editing screen display unit, 112…test object part information designation unit, 113…variable definition part information extraction unit, 120…test program editing unit, 121…test program editing screen display unit, 122…expected result information designation unit, 123…programming language information information designation unit, 124…purpose information designation unit, 125…test program related information management unit, 126…export unit, 127…import unit, 130…test program generation unit, 140…test program communication unit, 141…test program output unit, 142…execution result information acquisition unit, 150…test result information generation unit, 160…test result information display unit, 170…storage unit, 171…test program related information storage unit, 172…error cause information storage unit, 200…FA control device, 210…FA controller, 220…FA equipment, 2 11…Test program acquisition unit, 212…Test program execution unit, 213…Execution result information output unit, 221…Servo amplifier, 222…Servo motor, 300…Edit screen, 310…Information selection unit, 311…Test object selection tab, 312…Local variable selection tab, 313…Global variable selection tab, 314…Programming language selection tab, 315…Expected value selection tab, 316…Application selection tab, 317…Test program list selection tab, 320…Information display unit, 321…Test object information, 322…Test Test program name information, 323…Automatic generation button, 324…Variable definition part information, 325…Variable definition check button, 326…Programming language information, 327…Expected result information, 328…Test program list information, 329…Test program execution button, 350…Test program related information, 351…Purpose information, 352…Source information, 353…Compile information, 400…FA control device simulator, 410…FA controller simulator, 420…FA equipment simulator, 421…Servo amplifier simulator, 422…Servo motor simulator.

Claims

1. A computer-readable recording medium storing an FA control test auxiliary program, wherein the FA control test auxiliary program causes a computer to function as the following unit: a test object part information designating unit which designates, by setting one of a plurality of instructions constituting a routine of a program written in an FA control programming language as a minimum unit, test object part information indicating a part to be tested from the program; a variable definition part information extraction unit that extracts variable definition part information from the program, the variable definition part information being information indicating a part that defines a variable used in a part that is a subject of the test; an expected result information designating unit for designating expected result information indicating a result expected by a user when a control unit of an FA control device that controls a controlled unit by executing the program executes the test program; a test program generating unit that generates the test program based on the test object partial information, the variable definition partial information, and the expected result information; a test result information generating unit for generating test result information indicating a result of the test based on execution result information indicating an execution result when the control unit executes the test program; as well as A test result information display unit, which displays the test result information, The expected result information is information that can determine the user's expected value for the output value of the controlled unit that may change when the test program is repeatedly executed for each execution number. The execution result information is information capable of identifying the result of comparing the output value and the expected value when the test program is repeatedly executed for each execution number.

2. The computer-readable recording medium according to claim 1, The FA control test auxiliary program enables the computer to function as the following unit: an exporting unit that causes information related to the test program, namely, test program related information, to be stored in a storage unit, the test program related information being information including at least the test object partial information, the variable definition partial information, and the test program; and An importing unit is configured to obtain the test program related information stored in the storage unit.

3. An FA control test assisting device that assists in testing a program written in an FA control programming language, The FA control test auxiliary device has: a test object part information designating unit for designating test object part information representing a part to be tested from the program, using one of a plurality of commands constituting a routine of the program as a minimum unit; a variable definition part information extraction unit that extracts variable definition part information from the program, the variable definition part information being information indicating a part that defines a variable used in a part that is a subject of the test; an expected result information designating unit for designating expected result information indicating a result expected by a user when a control unit of an FA control device that controls a controlled unit by executing the program executes the test program; a test program generating unit that generates the test program based on the test object partial information, the variable definition partial information, and the expected result information; a test result information generating unit for generating test result information indicating a result of the test based on execution result information indicating an execution result when the control unit executes the test program; as well as A test result information display unit, which displays the test result information, The expected result information is information that can determine the user's expected value for the output value of the controlled unit that may change when the test program is repeatedly executed for each execution number. The execution result information is information capable of identifying the result of comparing the output value and the expected value when the test program is repeatedly executed for each execution number.

4. An FA control test assisting method, which assists the testing of a program written in an FA control programming language, The FA control test auxiliary method includes: a test object part information designation step, wherein one of a plurality of commands constituting a routine of the program is set as a minimum unit, and the computer designates the test object part information representing the part to be tested from the program; a variable definition part information extraction step, wherein the computer extracts variable definition part information from the program, the variable definition part information being information indicating a part that defines variables used in a part that becomes a subject of the test; an expected result information designation step, wherein the computer designates expected result information indicating a result expected by a user when a control unit of an FA control device that controls a controlled unit by executing the program executes a test program; a test program generating step, wherein the computer generates the test program based on the test object part information, the variable definition part information and the expected result information; a test result information generating step of generating test result information indicating a result of the test based on execution result information indicating an execution result when the control unit executes the test program; as well as The test result information display step, wherein the computer displays the test result information, The expected result information is information that can determine the user's expected value for the output value of the controlled unit that may change when the test program is repeatedly executed for each execution number. The execution result information is information capable of identifying the result of comparing the output value and the expected value when the test program is repeatedly executed for each execution number.

5. An FA control test support system comprising an FA control device controlled by a program written in an FA control programming language and an FA control test support device for supporting the test of the program, wherein: The FA control device comprises: a control unit that controls the controlled unit by executing the program, The FA control test auxiliary device comprises: a test object part information designating unit for designating test object part information representing a part to be tested from the program, using one of a plurality of commands constituting a routine of the program as a minimum unit; a variable definition part information extraction unit that extracts variable definition part information from the program, the variable definition part information being information indicating a part that defines a variable used in a part that is a subject of the test; an expected result information designating unit for designating expected result information, the expected result information being information indicating a result expected by a user when the test program is executed by the control unit; a test program generating unit that generates the test program based on the test object partial information, the variable definition partial information, and the expected result information; as well as a test program output unit that outputs the test program to the FA control device, The control unit is capable of executing the test program to control the controlled unit. The FA control test support device further includes: a test result information generating unit that generates information indicating a result of the test, namely test result information, based on execution result information, namely information indicating an execution result when the control unit executes the test program; as well as A test result information display unit, which displays the test result information, The expected result information is information that can determine the user's expected value for the output value of the controlled unit that may change when the test program is repeatedly executed for each execution number. The execution result information is information capable of identifying the result of comparing the output value and the expected value when the test program is repeatedly executed for each execution number.

Citation Information

Patent Citations

  • Program managing device

    JP1996212105A

  • Method and device for supporting unit test of software

    JP2003177942A

  • Test support system

    JP2007115071A

  • Control-program-development supporting apparatus, control-program-development supporting system, control-program-development supporting method, and control-program-development supporting program

    CN111033475A

  • Graphic language program preparing program and its device

    JP2003140714A