Creation support method, program, and creation support system
The creation support method and system enhance the reliability of product inspection programs by allowing for mid-execution stopping and result output, facilitating defect identification and correction.
Patent Information
- Application Number
- JP2021158183
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2041-09-28
AI Technical Summary
Existing product inspection programs lack reliability due to inefficiencies in debugging and identifying issues during the creation process.
A creation support method and system that includes a read process, execution process, and output process to support the creation of product inspection programs, allowing for the program to be stopped midway through execution and outputting results at the stop point, facilitating easier identification of defects.
This approach increases the reliability of product inspection programs by enabling easier analysis of their suitability and identification of problems, making it easier to correct defects.
Smart Images

Figure 0007734319000001 
Figure 0007734319000002 
Figure 0007734319000003
Abstract
Description
[Technical Field]
[0001] The present disclosure generally relates to a production support method, a program, and a production support system, and more particularly to a production support method, a program, and a production support system for supporting the production of a product inspection program. [Background technology]
[0002] The image processing device described in Patent Document 1 allows the user to select multiple desired processing items from a series of processing flows and display multiple processed images corresponding to the selected processing items, so that when a failure occurs, the processed images can be checked step by step. This makes it easier to identify the cause of a problem when it occurs. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2007-128306 Summary of the Invention [Problem to be solved by the invention]
[0004] The image processing device described in Patent Document 1 performs product inspection as described above. A program (product inspection program) is used for the product inspection. An object of the present disclosure is to provide a creation support method, program, and creation support system that can improve the reliability of the product inspection program. [Means for solving the problem]
[0005] A creation support method according to one aspect of the present disclosure is a creation support method that supports the creation of a product inspection program. The creation support method includes a read process, an execution process, and an output process. The read process reads test data. The execution process executes the product inspection program using the test data as input. The output process outputs the results of the execution process. The execution process includes a stop process that stops the product inspection program midway through execution. The output process includes outputting the results of the execution process at the time when processing of the product inspection program is stopped by the stop process.
[0006] A program according to one aspect of the present disclosure is a program for causing one or more processors to execute the creation support method.
[0007] A creation support system according to one aspect of the present disclosure is a creation support system that supports the creation of a product inspection program. The creation support system includes a reading unit, an execution unit, and an output unit. The reading unit reads test data. The execution unit executes the product inspection program using the test data as input. The output unit outputs the results of the processing by the execution unit. The processing by the execution unit includes a stop process that stops the product inspection program midway through execution. The processing by the output unit includes outputting the results of the processing by the execution unit at the time when processing of the product inspection program is stopped by the stop process. [Effects of the Invention]
[0008] Advantageously, the present disclosure can increase the reliability of product inspection programs. [Brief explanation of the drawings]
[0009] [Figure 1] FIG. 1 is an explanatory diagram illustrating an example of a display in a creation support method according to an embodiment. [Figure 2] FIG. 2 is a flowchart showing the execution process of the above-mentioned creation support method. [Figure 3]FIG. 3 is an explanatory diagram showing an example of a part of a display in the above-mentioned creation support method. [Figure 4] FIG. 4 is a block diagram of a production support system and a sensor device that realizes the production support method. [Figure 5] FIG. 5 is an explanatory diagram showing an example of a part of the display in the above-mentioned creation support method. DETAILED DESCRIPTION OF THE INVENTION
[0010] Hereinafter, a creation support method, a program, and a creation support system according to embodiments will be described with reference to the drawings. However, the following embodiment is merely one of various embodiments of the present disclosure. The following embodiment can be modified in various ways depending on the design, etc., as long as the object of the present disclosure can be achieved.
[0011] (overview) The creation support method of this embodiment is a method for supporting the creation of a product inspection program. More specifically, the creation support method is executed to check (debug) the operation of the product inspection program. Before the product inspection program is actually used in the product inspection process, the creation support method checks the operation of the product inspection program on a computer system. A user refers to the results of the check and corrects any defects in the product inspection program.
[0012] The creation support method of this embodiment includes a read process, an execution process, and an output process.
[0013] In the reading process, test data is read in. For example, as shown in Fig. 1, a product image Im1 is read as test data and displayed on the display (display unit 14: see Fig. 4) of the computer system.
[0014] In the execution process, the product inspection program is executed using test data as input. The execution process includes a stop process that stops the product inspection program midway through its execution. The execution process is, for example, the process shown in the flowchart of FIG. 2, which will be described in more detail later.
[0015] The output process outputs the results of the execution process. The output process includes outputting the results of the execution process at the time when the processing of the product inspection program is stopped by the stop process. For example, as shown in FIG. 3, the values of various variables related to the product inspection are displayed on the display of the computer system (display unit 14: see FIG. 4) as information representing the results of the execution process. More specifically, when the processing of the product inspection program reaches the end of the program and stops (ends), and when the processing is stopped (interrupted) by the stop process, the current values of the variables are displayed. The variables are, for example, values related to the shape, characteristics, condition, and pass / fail of the product. Furthermore, the variables are, for example, flags related to conditional branching of the product inspection program. Furthermore, for example, a product image Im1 processed during the execution process is displayed on the display of the computer system (display unit 14: see FIG. 4) as information representing the results of the execution process.
[0016] According to this embodiment, it is easy to analyze the suitability of a product inspection program. That is, by outputting the processing results when the product inspection program is stopped, it is easy to identify whether or not there is a problem with the product inspection program and its cause. This makes it possible to increase the reliability of the product inspection program.
[0017] The creation support method of the present embodiment can be executed by one or more processors of a computer system. That is, a program according to one aspect is a program for causing one or more processors to execute the creation support method.
[0018] The creation support method of this embodiment can be executed by a creation support system 1 (see FIG. 4). The creation support system 1 is a system that supports the creation of a product inspection program. As shown in FIG. 1, the creation support system 1 includes a reading unit 111, an execution unit 112, and an output unit 113. The reading unit 111 reads test data. The execution unit 112 executes the product inspection program using the test data as input. The output unit 113 outputs the results of the processing by the execution unit 112. The processing by the execution unit 112 includes a stop process that stops the product inspection program midway through its execution. The processing by the output unit 113 includes outputting the results of the processing by the execution unit 112 at the time when the processing of the product inspection program is stopped by the stop process.
[0019] (detail) (1) Composition The configuration of the creation support system 1 will be described in more detail below. In this embodiment, it is assumed that a product inspection program inspects an object to be inspected based on an image of the object to be inspected. The object to be inspected is a product manufactured in a facility such as a factory. The product to be inspected is not particularly limited, but in FIG. 1, the product to be inspected shown in product image Im1 is a U-shaped member when viewed from above.
[0020] As shown in FIG. 4, the creation support system 1 includes a processing unit 11, a communication unit 12, a storage unit 13, and a display unit .
[0021] The creation support system 1 includes a computer system having one or more processors and a memory. At least some of the functions of the creation support system 1 are realized by the processor of the computer system executing a program recorded in the memory of the computer system. The program may be recorded in the memory, or may be provided via a telecommunications line such as the Internet, or may be recorded on a non-transitory recording medium such as a memory card and provided.
[0022] In this embodiment, a case where the creation support system 1 is implemented in a personal computer will be described as an example. That is, a program for realizing the creation support system 1 is provided to the personal computer, and this program is executed by a processor of the personal computer. Note that the creation support system 1 is not limited to a personal computer, and may be implemented in a mobile terminal such as a tablet terminal or a smartphone, or a server computer.
[0023] As will be described later, the user operates the personal computer to create a product inspection program.
[0024] The processing unit 11 includes one or more processors as described above. The processing unit 11 has a reading unit 111, an execution unit 112, and an output unit 113. Note that these merely indicate functions realized by one or more processors constituting the processing unit 11, and do not necessarily indicate a substantial configuration.
[0025] The production support method is executed by switching between a plurality of modes. When the production support method is realized by the production support system 1 as in this embodiment, the operation mode of the processing unit 11 is switched between among a plurality of modes. The plurality of modes includes a debug mode in which the product inspection program is debugged, and an operation mode in which the product inspection program is executed to inspect the inspection target.
[0026] In the debug mode, the reading unit 111 reads test data, and the execution unit 112 executes the product inspection program using the test data as input. In the operation mode, the reading unit 111 reads data of the product to be inspected, and the execution unit 112 executes the product inspection program using the data of the product to be inspected as input. The data of the product to be inspected is specifically electronic data of an image of the product to be inspected output from the sensor device 2 described below. This electronic data is received by the communication unit 12 and read by the reading unit 111.
[0027] The test data may be stored in advance in the storage unit 13 of the production support system 1, or may be provided to the production support system 1 via a non-transitory communication medium such as a flash memory or a network. Also, electronic data of an image of a test product output from the sensor device 2 may be used as the test data.
[0028] The execution unit 112 executes the product inspection program, and the output unit 113 outputs the execution result of the product inspection program. In operation mode, the execution result is the result at the end of the product inspection program. In debug mode, the execution result is the result when the product inspection program is stopped midway through execution, or the result at the end of the product inspection program. The output unit 113 outputs the values of various variables related to product inspection and a product image Im1 as information representing the execution result. Specifically, the output unit 113 displays the execution result on the display unit 14.
[0029] The communication unit 12 includes a communication interface device. The communication unit 12 is capable of communicating with the sensor device 2 via the communication interface device. In this disclosure, "capable of communication" means being able to send and receive signals directly or indirectly via a network, a repeater, or the like, using an appropriate communication method such as wired communication or wireless communication. In this embodiment, the communication unit 12 communicates with the sensor device 2 via a router R1.
[0030] The storage unit 13 stores information used in the production support system 1. The storage unit 13 stores, for example, a product inspection program created by the production support system 1. The storage unit 13 is, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), or an EEPROM (Electrically Erasable Programmable Read Only Memory).
[0031] The display unit 14 is an output interface that displays information related to the creation support method. The display unit 14 is, for example, a display device such as a liquid crystal display or an organic EL (Electro Luminescence) display. FIG. 1 shows an example of an image displayed on the display unit 14. The display unit 14 displays the execution results of the product inspection program. The display unit 14 also displays a user interface that guides the user through operations to execute the product inspection program creation support method.
[0032] The creation support system 1 is used together with a sensor device 2. The sensor device 2 is a device for detecting a physical quantity related to an inspection object. The sensor device 2 of this embodiment captures an image of the inspection object and generates electronic data of the image of the inspection object. That is, in this embodiment, the physical quantity corresponds to the amount of light on the surface of the inspection object. The sensor device 2 has an imaging unit 21, an image processing unit 22, and a communication unit 23.
[0033] The imaging unit 21 captures an image of an object to be inspected and generates electronic data of the image of the object to be inspected. The imaging unit 21 is, for example, a two-dimensional image sensor such as a CCD (Charge Coupled Devices) image sensor or a CMOS (Complementary Metal-Oxide Semiconductor) image sensor.
[0034] The image processing unit 22 performs image processing on the electronic data of the image of the inspection target generated by the imaging unit 21. As an example, the image processing unit 22 performs data format conversion, data compression, and the like.
[0035] The communication unit 23 includes a communication interface device, and is capable of communicating with the communication unit 12 of the creation support system 1 via the communication interface device.
[0036] (2)Screen display Fig. 1 will be described in more detail below. A user operates a mouse connected to a personal computer to position the mouse cursor on a predetermined position on the image displayed in Fig. 1 and perform a click operation or the like, thereby causing the creation support system 1 to execute the creation support method. As shown in Fig. 1, the image displayed on the display unit 14 includes windows 3 to 8. Note that Fig. 1 is an example of a user interface for executing the creation support method, and for example, the layout of various buttons and the displayed characters are not limited to those shown in Fig. 1.
[0037] Window 3 includes multiple (five in FIG. 1 ) tabs 31. When the user operates (clicks) to select a desired tab 31 from the multiple tabs 31, a corresponding ribbon is expanded. When the user operates to select the tab 31 labeled "Debug" from the multiple tabs 31, a ribbon is expanded that includes an interface (multiple buttons, etc.) for executing a creation support method (the creation support method includes debugging of a product inspection program). The multiple buttons include a start / continue button 32, a stop button 33, a step in button 34, a step over button 35, a step out button 36, a set / cancel breakpoint button 37, and a delete all breakpoints button 38.
[0038] Window 4 includes a display window 41 that shows the setup procedure for product inspection. For example, in this embodiment, the setup procedure is in the following order: imaging the inspection target, reading in the reference image, inspection, overall judgment, result output, and image output. Character strings that show each step are displayed in display window 41.
[0039] Window 5 is a window for editing the product inspection program, setting breakpoints, etc. Window 5 displays a flowchart 51 (flowchart 51A in FIG. 1, flowchart 51B in FIG. 5) that represents at least a part of the product inspection program. In other words, the product inspection program is displayed in a flowchart format.
[0040] Window 5 also includes a main tab 52 and multiple block tabs (block tabs 53, 54, etc.). When the user operates (clicks) to select main tab 52, a main routine is displayed as a flowchart 51, as shown in FIG. 1. The main routine is configured by combining multiple blocks. In particular, in FIG. 1, the main routine is configured by combining multiple blocks as well as one or more chips. Specifically, steps S3 and S6 are each chips, and steps S1, S2, S4, S5, S7, and S8 are each blocks. Each block includes multiple chips. As will be described later, when debugging a product inspection program, processing is performed in units of chips during step-in, and processing is performed in units of blocks during step-over.
[0041] In the flowchart 51, a comment explaining the contents of the chip and the name of the chip are written in a rectangle representing each chip. Also, in the flowchart 51, a comment explaining the contents of the block and the name of the block are written in a rectangle representing each block.
[0042] Each of the plurality of block tabs 53 and 54 corresponds to one of the blocks (steps S1, S2, S4, S5, S7, or S8). Block tabs other than the block tabs 53 and 54 are omitted in FIG.
[0043] When the user operates (clicks) and selects a block tab 53, a flowchart 51B showing the contents of the corresponding block is displayed, as shown in Fig. 5. In Fig. 5, the block (step S1) includes multiple chips (steps S11 to S14).
[0044] The window 5 also includes edit buttons 55 to 57. The edit buttons 55 to 57 are used by the user to edit the product inspection program.
[0045] The window 6 includes a display area for the product image Im1. The product image Im1 read by the reading unit 111 (see FIG. 4) is displayed in the window 6.
[0046] The window 7 includes a display area for information about the product image Im1 displayed in the window 6. The display area displays, for example, image specifications (such as the type of monochrome image or color image, and the image size), imaging settings, etc.
[0047] The window 8 includes a plurality of tabs 81 to 83 (three in FIG. 1).
[0048] When tab 81 labeled "Guidelines" is selected by clicking, help information is displayed in window 8. For example, when a specific step (e.g., step S1) in flowchart 51 in window 5 is selected, information explaining the processing content of that specific step is displayed in window 8.
[0049] When the tab 82 labeled "Inspection History" is selected by clicking, a list of product images that have been inspected in the past by the product inspection program is displayed in window 8, as shown in FIG. 1. In FIG. 1, each product image is displayed with a label indicating the inspection time. When the user selects a product image, the inspection results corresponding to the selected product image are displayed. For example, a product image can be selected by double-clicking.
[0050] When the tab 83 labeled "Variables" is selected by clicking, the window 8 displays the values of various variables related to product inspection, as shown in FIG. 3 . More specifically, the window 8 includes multiple (five in FIG. 3 ) buttons 831 and a display area 832. The display area 832 displays the variable ID, variable name, comment about the variable, initial value of the variable, and current value of the variable. The multiple buttons 831 are used to switch the content displayed in the display area 832. Pressing an edit button 8310 among the multiple buttons 831 enables editing of the content displayed in the display area 832. At this time, the current value of the variable can be changed by the user inputting the current value of the variable. The current value of the variable can be changed even when the product inspection program is stopped by the stop processing. In other words, the creation support method of this embodiment further includes a change processing, which changes variables related to the processing of the product inspection program when the product inspection program is stopped by the stop processing. The current value of a variable is changed, for example, by keystrokes.
[0051] (3) Debugging Next, an example of a processing flow when checking (debugging) the operation of a product inspection program using the creation support method will be described.
[0052] (3.1) Creating a product inspection program First, a user operates a personal computer equipped with the creation support system 1 to create a product inspection program. The creation support system 1 is configured to enable even users without knowledge of program writing methods to create a product inspection program. More specifically, the user creates a product inspection program by combining multiple pre-prepared processes (chips and blocks). That is, the creation support method of this embodiment further includes a process of creating a product inspection program by combining multiple pre-prepared processes. More specifically, the creation support method of this embodiment includes a process of creating a product inspection program by combining multiple pre-prepared blocks (and chips). Each of the multiple blocks includes multiple chips, and a chip is a unit of processing in step-in. A chip consists of one or more lines of code. If a chip is replaced with general program code, a chip corresponds to one or more lines of code. A chip may include one or more subroutines. For example, a process with relatively short code is defined as a chip, and a process with relatively long code is defined as a block.
[0053] Using FIG. 1 as an example, each of steps S1 to S8 displayed in window 5 is a combinable process (chip or block). By operating (clicking) edit buttons 55 to 57, the user can display a list of multiple pre-prepared processes (chips or blocks), select a process (chip or block) from the list, and move the selected process (chip or block) to window 5, thereby incorporating the process (chip or block) into the product inspection program. The multiple pre-prepared processes also include conditional branching processes. In FIG. 1, step S3 is a process for branching the flow according to a condition, and step S6 is a process for merging the branched flows.
[0054] Step S1 is a process for adjusting the position of the inspection object in an image in which the inspection object is captured. As shown in FIG. 5, step S1 includes steps S11 to S14. The processes of steps S11 and S12 are a process for measuring the position of the edge of the inspection object in a predetermined axis direction. The process of step S13 is a process for rotating the inspection object to correct its position. Step S14 is a process for performing a predetermined calculation based on the image of the inspection object.
[0055] Other examples of pre-prepared processes (chips or blocks) are listed below. The following examples are examples of processes for inspecting an object to be inspected based on an image of the object to be inspected by processing or analyzing the image of the object to be inspected, and are well-known techniques, so detailed explanations will be omitted. The process may be a process for removing noise from an image. The process may be a process for blurring an image. The process may be a process for binarizing an image. The process may be a process for emphasizing a characteristic portion of an image. The process may be a process for changing the contrast of an image. The process may be a process for determining the presence or absence of an object to be inspected in an image. The process may be a process for determining the number of objects to be inspected in an image. The process may be a process for determining the positions of objects to be inspected. The process may be a process for determining the dimensions of objects to be inspected. The process may be a process for determining the color of objects to be inspected. The process may be a process for extracting features of objects to be inspected. The process may be a process for determining the contour of an object to be inspected. The process may be a process for pattern matching an object to be inspected. The process may be a process for pattern matching a contour of an object to be inspected. The above process may be a process for determining whether or not the object to be inspected has features such as scratches, burrs, or chips.
[0056] (3.2) Product Inspection Program Testing After creating the product inspection program as described above, the user inputs test data and causes the execution unit 112 (see FIG. 2) to execute the product inspection program, thereby debugging it. This will be described with reference to FIGS. 1 and 2. Note that the flowchart shown in FIG. 2 merely shows an example of processing by the execution unit 112 according to the present disclosure, and the order of processing may be changed as appropriate, and processing may be added or omitted as appropriate.
[0057] First, test data is loaded and displayed in window 6. Window 5 displays the product inspection program as a flowchart 51. Here, the user operates multiple buttons on tab 31 labeled "DEBUG" in window 3 to cause execution unit 112 to execute the product inspection program. Operate tab 31 labeled "DEBUG" and expand the corresponding ribbon, which corresponds to the debug mode described above. Operate tab 31 labeled "INSPECTION" and expand the corresponding ribbon, which corresponds to the operation mode described above.
[0058] (3.2.1) Step into When the step-in button 34 is operated (clicked), step-in is executed. In step-in, processing is performed in units of chips. In other words, the execution processing in the creation support method includes step-in, and in step-in, execution of the product inspection program is stopped after processing of one chip is executed.
[0059] When the step-in button 34 is operated (process P1: input = Step Into), the next process in the product inspection program is executed (process P2), and then execution of the product inspection program is stopped (process P3). For example, if the step-in button 34 is operated when the product inspection program has not yet started, step S11 (chip), which is a process in step S1 (block), is executed, and then execution of the product inspection program is stopped. When the step-in button 34 is operated again, step S12 is executed, and then execution of the product inspection program is stopped. After step S14 is executed, when the step-in button 34 is operated, the first process (chip) in step S2 (block) is executed.
[0060] When the final process of step S8 is executed, the process reaches the end of the product inspection program (process P4: Yes), and the execution of the product inspection program ends.
[0061] (3.2.2) Step-over Furthermore, when the step over button 35 is operated (clicked), a step over is executed. In a step over, processing is performed in units of blocks. In other words, the execution processing in the production support method includes a step over, and when a step over is executed in a state where the next processing in the product inspection program is the processing at the beginning of a block, the processing continues until the block is exited, and a block includes processing of two units (i.e., two chips) or more.
[0062] When the step over button 35 is operated (process P1: input = Step Over), if the next process in the product inspection program is not the process at the beginning of a block (process P5: No), the same process as when the step in button 34 is operated is performed. That is, the process for the next chip is executed. If the next process in the product inspection program is the process at the beginning of a block (process P5: Yes), the process continues until the block is exited (process P6). For example, if the product inspection program has not yet started, the next process is step S11 at the beginning of step S1 (block), so steps S11 to S14 included in step S1 are executed in succession, and then execution of the product inspection program stops (process P3). When the step over button 35 is operated again, all of the processes included in step S2 are executed, and then execution of the product inspection program stops. If step S8 is executed, the process reaches the end of the product inspection program (process P4: Yes), and execution of the product inspection program ends.
[0063] (3.2.3) Stepping out Furthermore, when the step out button 36 is operated (clicked), step out is executed. In step out, processing continues until the block is exited. In other words, the execution processing in the creation support method includes step out, which continues processing during execution of a block until the block is exited, and a block includes processing for two or more units (i.e., two chips) of the product inspection program.
[0064] When the step out button 36 is operated (process P1: input = Step Out), if the previous process in the product inspection program is not a process within a block (process P7: No), the same process as when the step in button 34 is operated is performed. That is, the process for the next chip is executed. If the previous process in the product inspection program is a process within a block (process P7: Yes), the process continues until the block is exited (process P6). For example, if the previous process is step S11 within step S1 (block), steps S12 to S14 after step S11 in step S1 are executed, and then execution of the product inspection program stops (process P3). If step out is executed within step S8, the process reaches the end of the product inspection program (process P4: Yes), and execution of the product inspection program ends.
[0065] (3.2.4) Start / Continue Furthermore, when the start / continue button 32 is operated (clicked), processing continues until the product inspection program ends or a breakpoint is reached. For example, if the start / continue button 32 is operated when no breakpoint has been set and the product inspection program has not yet started, steps S1 to S3 are executed, then step S4 or S5 is executed, and then steps S6 to S8 are executed. Furthermore, if the start / continue button 32 is operated when processing of the product inspection program has stopped, processing following the stop position continues. For example, if processing has stopped after step S6 has been executed but before step S7 is executed, then when the start / continue button 32 is operated, steps S7 and S8 are executed.
[0066] (3.2.5) Breakpoints Furthermore, when the product inspection program is not being executed, breakpoints can be set and cleared. More specifically, when the set / clear breakpoint button 37 is operated (clicked), the system switches to a mode in which breakpoints can be set / cleared. At this time, when the blank space to the left of a block or chip (steps S1 to S8, S11 to S14) displayed in the window 5 is operated (clicked), a breakpoint is set in that block or chip. A circle is attached to the block or chip to which a breakpoint has been set. For example, in FIG. 1, a circle indicating that a breakpoint has been set in step S5 is displayed in the blank space to the left of step S5. When the same operation (click) is performed again, the breakpoint in that block or chip is cleared. Furthermore, when the delete all breakpoints button 38 is operated (clicked), all set breakpoints are cleared.
[0067] When the start / continue button 32 is operated with a breakpoint set, the processing stops at the breakpoint. In other words, the production support method further includes a setting process for setting a breakpoint in the product inspection program, and in the execution process, the processing stops when the processing of the product inspection program reaches the breakpoint.
[0068] More specifically, when the start / continue button 32 is operated (process P1: input = Start), the next process is executed on a chip-by-chip basis (process P8). If a breakpoint is set immediately after this process (process P9: Yes), execution of the product inspection program is stopped (process P3). If not, it is determined whether the end of the product inspection program has been reached (process P10). If the end has been reached (process P10: Yes), execution of the product inspection program ends. If the end has not been reached (process P10: No), the next process is executed (process P8). Processes continue to be executed until a breakpoint is reached or the end of the product inspection program is reached.
[0069] Breakpoints can be set not only at steps S1 to S8 of the main routine, but also at chips within blocks (for example, steps S11 to S14).
[0070] Although not shown in FIG. 2, if the processing continues to be executed by stepping out and the processing reaches a breakpoint, the execution of the product inspection program will also stop.
[0071] (3.2.6) Stop When the stop button 33 is operated (clicked) during execution of the product inspection program, the processing of the product inspection program is temporarily stopped. After that, when any of the multiple buttons for executing the processing is operated, the processing is resumed. The multiple buttons for executing the processing are the start / continue button 32, the step in button 34, the step over button 35, and the step out button 36.
[0072] When a process is stopped, the point where it has stopped is highlighted. For example, when a process is stopped, a specific icon is displayed in the blank space to the left of the process to be executed next. Alternatively, when a process is stopped, a specific color is applied to the rectangle representing the process to be executed next (step S1, S11, etc.).
[0073] (3.2.7) Display when stopped When the processing of the product inspection program reaches the end of the program and ends, and when the processing is interrupted by a stop process, the values of various variables related to the product inspection are displayed as shown in Fig. 3. "When the processing is interrupted by a stop process" means when the processing has progressed to a breakpoint, when one chip has been processed by stepping in, when one block has been processed by stepping over or stepping out, and when the stop button 33 is operated.
[0074] By rewriting the value of the variable, it is possible to change the branch destination in the process that branches depending on the value of the variable (step S3), thereby making it possible to debug the program at each branch destination.
[0075] The product inspection program may also include a processing process for processing product image Im1 as an input image. When the processing of the product inspection program reaches the end of the product inspection program and ends, or when the processing is interrupted by a stop process, window 6 (see FIG. 1) displays product image Im1 at that time. In other words, the execution process in the creation support method may include a processing process for processing the image of the inspection target (product image Im1). The output process may include outputting the image of the inspection target at the time when the processing of the product inspection program is stopped by the stop process.
[0076] In the above, it has been explained that the product inspection program ends when the processing of the product inspection program reaches the end, but of course, a process for ending or stopping the product inspection program may be incorporated at a position before the end. In this case, the ending or stopping may be a normal ending, an abnormal ending, a normal stop, or an abnormal stop, but since the product inspection program ends or stops by itself, it does not fall under the category of stopping by a "stop process" as referred to in this disclosure.
[0077] (4) Product inspection When the tab 31 labeled "Inspection" in the window 3 in Fig. 1 is operated and the corresponding ribbon is unfolded, the production support system 1 enters an operation mode in which a product inspection program is executed to inspect the inspection target. The ribbon corresponding to the tab 31 labeled "Inspection" has at least a button for starting the inspection (a button with the same function as the start / continue button 32). The ribbon also preferably has a button for stopping the inspection (a button with the same function as the stop button 33).
[0078] The difference between the debug mode and the operation mode is as follows: In the debug mode, the breakpoints of the product inspection program are enabled. In the operation mode, the breakpoints of the product inspection program are disabled. In other words, when the product inspection program created in window 5 is used in the operation mode, the breakpoints are deleted.
[0079] In the operation mode, electronic data (image data) of an image of an inspection target generated by the imaging unit 21 of the sensor device 2 (see FIG. 4) is provided from the sensor device 2 to the production support system 1. Using this image data as input, a product inspection program is executed.
[0080] However, the product inspection program used in the operation mode does not have to be completely identical to the product inspection program used in the debug mode. The former may include part or all of the latter. For example, if the product inspection program used in the debug mode is a program that performs a single inspection, the product inspection program used in the operation mode may be a program that repeatedly executes the product inspection program used in the debug mode. Furthermore, the product inspection program used in the operation mode may be a combination of the product inspection program used in the debug mode and another program.
[0081] (advantage) According to the above-described creation support method, program, and creation support system 1, when the product inspection program is stopped, variables and images, etc., as processing results are output, making it easier to identify whether or not there is a problem with the product inspection program and its cause. This makes it possible to increase the reliability of the product inspection program.
[0082] Furthermore, the processing can be stopped regardless of whether or not the processing is determined to be abnormal in the product inspection program, which makes it easier to identify whether or not there is a problem with the product inspection program and its cause.
[0083] Furthermore, a product inspection program is created by a user by combining blocks (and chips). A block includes multiple chips. Each chip and block is a predefined process. When debugging a product inspection program, processing is performed in units of chips or blocks. Therefore, even users who are not familiar with programming can easily debug compared to executing program code line by line, as is the case when debugging general program code.
[0084] (Modification of the embodiment) Modifications of the embodiment are listed below. The following modifications may be implemented in appropriate combination.
[0085] In the embodiment, a click operation and the like are given as a specific example of an operation performed by a user to realize the creation support method, but the operation is not limited to a click operation and may be, for example, a double-click operation, a drag operation, etc. Furthermore, the operation is not limited to an operation using a mouse and may be, for example, a touch operation on a touch panel, etc.
[0086] In the embodiment, a chip is the smallest unit of processing of the product inspection program. However, there may be processes smaller than a chip. The execution process may include stopping the execution of the product inspection program after one of the processes smaller than a chip has been executed.
[0087] The output process is not limited to visually displaying the results of the execution process on the display unit 14. The output process may be outputting the results of the execution process as sound. Alternatively, the output process may be transferring the results of the execution process as electronic data to a recording medium or an external device of the creation support system 1.
[0088] Disabling a breakpoint in the product inspection program in the operation mode is not limited to deleting the breakpoint, and instead of deleting the breakpoint, the process may not be stopped even if it reaches the breakpoint.
[0089] The product inspection program is not limited to a program that inspects an object based on an image of the object, but may be a program that inspects the object based on the detection results of a sensor device that detects a physical quantity related to the object and that includes a positioning sensor, an ultrasonic sensor, a temperature sensor, or the like.
[0090] In the embodiment, after the test data is input, the debugging of the product inspection program is completed on the computer system. However, the debugging of the product inspection program does not have to be completed on the computer system. For example, the debugging of the product inspection program may be performed using additional information obtained from outside the computer system. For example, the product inspection program may be debugged using the detection results of a sensor device that detects environmental conditions. Furthermore, a device external to the computer system may be controlled by executing the product inspection program during the debugging process. Furthermore, the debugging of the product inspection program may be performed using additional data related to the operating status of the device. Conversely, the debugging of the product inspection program may be completed on the computer system by replacing the data related to the operating status of the device with predetermined data.
[0091] The creation support system 1 in the present disclosure includes a computer system. The computer system is primarily composed of a processor and memory as hardware. At least a portion of the functions of the creation support system 1 in the present disclosure are realized by the processor executing a program stored in the memory of the computer system. The program may be pre-stored in the memory of the computer system, provided via a telecommunications line, or provided in a non-transitory recording medium readable by the computer system, such as a memory card, optical disk, or hard disk drive. The processor of the computer system is composed of one or more electronic circuits including a semiconductor integrated circuit (IC) or a large-scale integrated circuit (LSI). The integrated circuits, such as ICs and LSIs, are referred to by different names depending on the degree of integration, and include integrated circuits called system LSIs, very large-scale integrations (VLSIs), and ultra-large-scale integrations (ULSIs). Furthermore, field-programmable gate arrays (FPGAs), which are programmed after the LSI is manufactured, or logic devices that allow the reconfiguration of internal connections or circuit partitions within the LSI can also be used as processors. The electronic circuits may be integrated into one chip or distributed across multiple chips. The chips may be integrated into one device or distributed across multiple devices. The computer system referred to here includes a microcontroller having one or more processors and one or more memories. Therefore, the microcontroller is also composed of one or more electronic circuits including a semiconductor integrated circuit or a large-scale integrated circuit.
[0092] Furthermore, it is not essential for the creation support system 1 that multiple functions are integrated into one device, and the components of the creation support system 1 may be distributed across multiple devices. Furthermore, at least some of the functions of the creation support system 1, for example, some of the functions of the execution unit 112, may be realized by the cloud (cloud computing) or the like.
[0093] Conversely, in the embodiment, multiple functions distributed across multiple devices may be consolidated into one device. For example, multiple functions distributed across the creation support system 1 and the sensor device 2 may be consolidated into one device.
[0094] (summary) The above-described embodiments and the like disclose the following aspects.
[0095] A creation support method according to a first aspect is a creation support method that supports the creation of a product inspection program. The creation support method includes a read process, an execution process, and an output process. The read process reads test data. The execution process executes the product inspection program using the test data as input. The output process outputs the results of the execution process. The execution process includes a stop process that stops the product inspection program midway through its execution. The output process includes outputting the results of the execution process at the time when the processing of the product inspection program is stopped by the stop process.
[0096] The above configuration makes it easier to analyze the suitability of a product inspection program. That is, by outputting the processing results when the product inspection program is stopped, it becomes easier to identify whether or not there is a problem with the product inspection program and its cause. This increases the reliability of the product inspection program.
[0097] In addition, in the creation support method according to the second aspect, in the first aspect, the execution process includes step-in, in which the execution of the product inspection program is stopped after executing one chip, which is a unit of processing, of the product inspection program.
[0098] According to the above configuration, processing can be executed chip by chip.
[0099] The method for supporting the creation of a product inspection program according to a third aspect of the present invention is the same as that according to the second aspect of the present invention, and further includes a step of creating a product inspection program by combining a plurality of blocks prepared in advance. Each of the plurality of blocks includes a plurality of chips. The chips are the units of processing in the step-in.
[0100] According to the above configuration, a product inspection program can be easily created and the reliability of the created product inspection program can be improved. Furthermore, in step-in, processing is performed on a chip-by-chip basis. Therefore, even users who are not familiar with programming can easily perform debugging.
[0101] In addition, in a creation support method according to a fourth aspect, in any one of the first to third aspects, the execution process includes a step over. When a step over is executed in a state where the next process of the product inspection program is the process at the beginning of a block, the process continues to be executed until the block is exited. A block includes two or more units of process.
[0102] According to the above configuration, the processing of the blocks can be executed collectively.
[0103] In addition, in a creation support method according to a fifth aspect, in any one of the first to fourth aspects, the execution process includes stepping out. Stepping out continues executing a process during execution of a block until the block is exited. The block includes two or more units of processing of the product inspection program.
[0104] According to the above configuration, the processing of the blocks can be executed collectively.
[0105] In addition, a creation support method according to a sixth aspect is the method according to any one of the first to fifth aspects, further comprising a setting process. In the setting process, a breakpoint is set in the product inspection program. In the execution process, when the processing of the product inspection program reaches the breakpoint, the processing is stopped.
[0106] According to the above configuration, processing can be executed all at once up to the breakpoint.
[0107] In addition, in a creation support method according to a seventh aspect, in the sixth aspect, a plurality of modes including a debug mode and an operation mode are switched and executed. In the debug mode, the product inspection program is debugged. In the operation mode, the product inspection program is executed to inspect the inspection target. In the debug mode, breakpoints in the product inspection program are enabled. In the operation mode, breakpoints in the product inspection program are disabled.
[0108] According to the above configuration, it is possible to perform both debugging of the product inspection program and operation in actual inspection.
[0109] In addition, the creation support method according to an eighth aspect is any one of the first to seventh aspects, and further includes a change process. The change process is a process for changing variables related to the processing of the product inspection program when the product inspection program is stopped by the stop process.
[0110] According to the above configuration, the state of the product (whether or not there is a defect, etc.) can be simulated to debug the product inspection program.
[0111] In addition, in a production support method according to a ninth aspect, in any one of the first to eighth aspects, the product inspection program inspects the inspection object based on an image of the inspection object.
[0112] According to the above configuration, the reliability of image-based inspection can be improved.
[0113] In addition, in a creation support method according to a tenth aspect, in the ninth aspect, the execution process includes a processing process. The processing process is a process of processing an image of the inspection object. The output process includes outputting the image of the inspection object at the time when the processing of the product inspection program is stopped by the stop process.
[0114] According to the above configuration, it is possible to output an image that has been processed by the processing process or an image that is in the process of being processed.
[0115] In addition, a creation support method according to an eleventh aspect is any one of the first to tenth aspects, further comprising a process of creating a product inspection program by combining a plurality of processes prepared in advance.
[0116] According to the above configuration, a product inspection program can be easily created, and the reliability of the product inspection program thus created can be improved.
[0117] The configurations other than the first aspect are not essential for the creation support method and can be omitted as appropriate.
[0118] A program according to a twelfth aspect is a program for causing one or more processors to execute the creation support method according to any one of the first to eleventh aspects.
[0119] According to the above configuration, the reliability of the product inspection program can be improved.
[0120] A creation support system (1) according to a thirteenth aspect is a creation support system that supports the creation of a product inspection program. The creation support system (1) includes a reading unit (111), an execution unit (112), and an output unit (113). The reading unit (111) reads test data. The execution unit (112) executes the product inspection program using the test data as input. The output unit (113) outputs the results of the processing by the execution unit (112). The processing by the execution unit (112) includes a stop process that stops the product inspection program midway through its execution. The processing by the output unit (113) includes outputting the results of the processing by the execution unit (112) at the time when the processing of the product inspection program is stopped by the stop process.
[0121] According to the above configuration, the reliability of the product inspection program can be improved.
[0122] Not limited to the above aspects, various configurations (including modified examples) of the creation support system (1) according to the embodiment can be embodied as a creation support method, a (computer) program, or a non-transitory recording medium on which a program is recorded. [Explanation of symbols]
[0123] 1 Creation support system 111 Reading section 112 Executive Department 113 Output section
Claims
1. A creation support method for supporting the creation of a product inspection program, comprising: A read process for reading test data; an execution process for executing the product inspection program using the test data as input; an output process for outputting a result of the execution process; the execution process includes a stop process for stopping the product inspection program during execution, the output process includes outputting a result of the execution process at a time when the processing of the product inspection program is stopped by the stop process. How to help create it.
2. The result of the execution process includes information on any one of variables, flags, and images. The creation support method according to claim 1 .
3. The execution process includes a step-in that stops execution of the product inspection program when one chip, which is a processing unit, is executed. The creation support method according to claim 1 or 2.
4. The method further comprises a process of creating the product inspection program by combining a plurality of blocks prepared in advance, each of the plurality of blocks includes a plurality of chips, and the chips are units of processing in the step-in; The creation support method according to claim 3.
5. The execution process includes a step-over, and when the step-over is executed in a state where the next process of the product inspection program is the first process of a block including two or more units of process, the process continues to be executed until the block is exited. The creation support method according to any one of claims 1 to 4.
6. The execution process includes a step-out that continues executing a block including two or more units of processing of the product inspection program until the block is exited during execution of the block. The creation support method according to any one of claims 1 to 5.
7. The method further comprises a setting process for setting a breakpoint in the product inspection program, In the execution process, when the processing of the product inspection program progresses to the breakpoint, the processing is stopped. The creation support method according to any one of claims 1 to 6.
8. Switching between a plurality of modes including a debug mode for debugging the product inspection program and an operation mode for executing the product inspection program to inspect an inspection target, In the debug mode, enabling the breakpoints in the product inspection program; In the operation mode, the breakpoints in the production inspection program are disabled. The creation support method according to claim 7.
9. The method further includes a change process for changing a variable related to the processing of the product inspection program when the product inspection program is stopped by the stop process. The creation support method according to any one of claims 1 to 8.
10. The product inspection program inspects the inspection object based on an image of the inspection object. The creation support method according to any one of claims 1 to 9.
11. The execution process includes a processing process for processing the image of the inspection object, the output process includes outputting the image of the inspection target at the time when the processing of the product inspection program is stopped by the stop process. The creation support method according to claim 10.
12. The method further comprises a process of creating the product inspection program by combining a plurality of processes prepared in advance. The creation support method according to any one of claims 1 to 11.
13. A method for causing one or more processors to execute the creation support method according to any one of claims 1 to 12, program.
14. A creation support system that supports the creation of a product inspection program, comprising: a reading unit that reads test data; an execution unit that executes the product inspection program using the test data as input; an output unit that outputs a result of the processing by the execution unit, the processing by the execution unit includes a stop processing for stopping the product inspection program midway through its execution, the processing by the output unit includes outputting a result of the processing by the execution unit at the time when the processing of the product inspection program is stopped by the stop processing. Creation support system.
15. The result of the processing by the execution unit includes information on any one of variables, flags, and images. The creation support system according to claim 14.
Citation Information
Patent Citations
Image processing apparatus
JP2007128306A
Audio apparatus for portable device
JP2015011342A
Inspection support device, inspection support method, and inspection support program
JP2017138901A
Debug session management
US20200250073A1