Simulation system, simulation system method, and simulation program
The simulation system enhances program verification efficiency by integrating 3D space and variable display with interactive debugging features, addressing the time-consuming nature of repeated playback in existing technologies.
Patent Information
- Application Number
- JP2021108836
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-06-30
- Publication Date
- 2025-08-13
- Estimated Expiration
- 2041-06-30
AI Technical Summary
Existing simulation technologies require repeated playback of programs to verify device operations, which is time-consuming.
A simulation system that includes a 3D space display and variable value display for each program step, with interactive debugging features like playback, reverse playback, breakpoint setting, and slow-motion functionality, allowing for efficient program verification.
Enables efficient program verification by allowing users to easily debug programs through detailed 3D space and variable value visualization, facilitating quicker identification and correction of issues.
Smart Images

Figure 0007721987000001 
Figure 0007721987000002 
Figure 0007721987000003
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to simulation systems, and more particularly to program debugging capabilities. [Background technology]
[0002] Computer simulations are used in a variety of technical fields, and by using such simulations, various advance studies can be carried out even when actual equipment does not exist.
[0003] Regarding simulation, for example, Japanese Patent Application Laid-Open No. 2021-045797 (Patent Document 1) discloses an apparatus including "a first behavior calculation unit that calculates the behavior of a first object placed in a virtual space corresponding to a first device to which an accessory device is attached, and a second behavior calculation unit that calculates the behavior of the second object in the virtual space corresponding to a second device, the second device including an accessory device. At each predetermined time step, the first behavior calculation unit calculates the behavior of the first object corresponding to the first device to which the accessory device is attached, and then the second behavior calculation unit calculates the behavior of the accessory device attached to the first device based on the calculated behavior of the first object" (see [Abstract]). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent Publication No. 2021-045797 Summary of the Invention [Problem to be solved by the invention]
[0005] According to the technology disclosed in Patent Document 1, it is necessary to repeatedly play back a simulation to verify a program for operating a device, which can take a long time to verify the program. Therefore, there is a need for a simulation technology that can verify programs more efficiently.
[0006] The present disclosure has been made in view of the above-described background, and an object of one aspect is to provide a simulation technique for more efficiently verifying a program. [Means for solving the problem]
[0007] According to one embodiment, there is provided a simulation system. The simulation system includes a memory for storing a program for controlling one or more devices, a processor for executing a simulation of the operation of the one or more devices according to the program, and a display for displaying a simulation screen. The simulation screen includes a 3D space display (three-dimensional) for displaying the position of each of the one or more devices in 3D space and a display of each value of one or more variables referenced by the program, and the 3D space display and the display of each value of the one or more variables are updated for each step of the program.
[0008] According to this disclosure, the simulation system can display, for each step of a program, a 3D space for displaying the position of each of one or more devices in the 3D space and the values of each of one or more variables referenced by the program. A user can easily debug the program by checking both the 3D space display and the display of the values of each of the one or more variables.
[0009] In the above disclosure, the simulation screen further includes an input UI (User Interface) for receiving an operation to play back or reverse play a scene of the simulation for each step of the program.
[0010] According to this disclosure, the simulation system can accept an operation to play back or reverse a simulation scene. A user can use the play back or reverse function to easily check what is before or after a problematic simulation scene.
[0011] In the above disclosure, the input UI is configured to be able to accept an operation to stop the simulation scene for each step of the program, or an operation to advance the simulation scene frame by frame for each step of the program.
[0012] According to this disclosure, the simulation system can accept operations to stop or step through the simulation scenes. A user can use the stop or step through functions to examine problematic simulation scenes and variable values in detail.
[0013] In the above disclosure, the input UI is configured to be able to accept an operation to play back or play back in reverse a scene of a simulation in units of one cycle or one step of a program.
[0014] According to this disclosure, the simulation system can accept an operation to play back or reverse a scene of a simulation in units of one cycle or one step of a program.
[0015] In the above disclosure, the simulation screen is configured to be able to accept an operation to set a breakpoint in a program.
[0016] According to this disclosure, the simulation system can accept an operation to set a breakpoint in a program.
[0017] In the above disclosure, the input UI is configured to be able to accept an operation for slow-motion playback or slow-reverse playback of a simulation scene.
[0018] According to this disclosure, the simulation system can accept an operation to play back a simulation scene in slow motion or in reverse slow motion.
[0019] In the above disclosure, the simulation screen further includes numerical information of the position of each of the one or more devices, and the numerical information of the position of each of the one or more devices is updated for each step of the program.
[0020] According to this disclosure, the simulation system may display numerical information for the position of each of one or more pieces of equipment for each step of the program.
[0021] In the above disclosure, the simulation screen is configured to further display a program. The display of the program includes the program code and the values of one or more variables. The simulation screen updates the values of one or more variables included in the display of the program for each step of the program.
[0022] According to this disclosure, the simulation system can display a program in which values are assigned to variables, and a user can debug the program by checking the program display for each step.
[0023] In the above disclosure, when the program steps forward or backward, if there is a change in the value of one or more variables included in the program display, the simulation screen highlights the changed value or the name of the variable to which the changed value has been assigned.
[0024] According to this disclosure, the simulation system can highlight to the user the variables whose values have changed.
[0025] In the above disclosure, the display of the program is configured to allow each of one or more variables to be selected, and the simulation screen displays a graph including the variables selected from the display of the program.
[0026] According to this disclosure, the simulation system may display a graph including selected variables.
[0027] In the above disclosure, the program display highlights the variables included in the graph. According to this disclosure, the simulation system may highlight variables included in a displayed graph of a program.
[0028] In the above disclosure, the simulation screen is configured to further display a program flowchart, and the display of the flowchart highlights a currently executed block among one or more blocks included in the flowchart.
[0029] According to this disclosure, the simulation system can highlight the currently executed block among one or more blocks included in the flowchart, allowing the user to easily grasp the currently executed block.
[0030] In the above disclosure, the display of the flowchart is configured to allow selection of one or more blocks included in the flowchart, and the display of the program displays or highlights a POU (Program Organization Unit) corresponding to the selected block.
[0031] According to this disclosure, the simulation system can display or highlight the POU corresponding to the selected block, allowing the user to easily identify the POU corresponding to the desired block in the flowchart.
[0032] According to another embodiment, there is provided a method executed by a simulation system, the method including the steps of: executing a simulation of the operation of one or more pieces of equipment according to a program for controlling the one or more pieces of equipment; and displaying a simulation screen, the simulation screen including a 3D spatial display for displaying the position of each of the one or more pieces of equipment in the 3D space and a display of each value of one or more variables referenced by the program, and updating the 3D spatial display and the display of each value of the one or more variables for each step of the program.
[0033] According to this disclosure, the method executed by the simulation system can display, for each step of a program, a 3D space for displaying the position of each of one or more devices in the 3D space and the values of each of one or more variables referenced by the program. A user can easily debug the program by checking both the 3D space display and the display of the values of each of the one or more variables.
[0034] According to another embodiment, there is provided a program for causing one or more processors to perform the above method.
[0035] According to this disclosure, a program can cause one or more processors to execute the above method. [Effects of the Invention]
[0036] According to an embodiment, it is possible to provide a simulation technique for more efficiently verifying a program.
[0037] The above and other objects, features, aspects and advantages of the present disclosure will become apparent from the following detailed description of the disclosure taken in conjunction with the accompanying drawings. [Brief explanation of the drawings]
[0038] [Figure 1]FIG. 1 is a diagram illustrating an example of a device whose operation can be simulated by a simulation system according to an embodiment. [Figure 2] FIG. 10 is a diagram showing an example of a state in which a simulation is performed by a simulation system 500. [Figure 3] FIG. 1 is a diagram showing an example of a unit configuration of a control system 2 including equipment to which a simulation technique according to an embodiment can be applied. [Figure 4] 1 is a diagram illustrating an example of a hardware configuration of an apparatus 100. FIG. [Figure 5] FIG. 2 is a diagram illustrating an example of a functional configuration of a simulation system 500. [Figure 6] FIG. 10 is a diagram illustrating a first example of a simulation situation. [Figure 7] FIG. 10 is a diagram illustrating a second example of the state of the simulation. [Figure 8] FIG. 10 is a diagram illustrating a third example of a simulation situation. [Figure 9] FIG. 5 is a diagram showing a first example of data stored in a repository 570. [Figure 10] FIG. 5 is a diagram showing a second example of data stored in a repository 570. [Figure 11] FIG. 10 is a diagram showing a first example of a debug screen in the simulation system 500. [Figure 12] FIG. 10 is a diagram showing a second example of a debug screen in the simulation system 500. [Figure 13] FIG. 10 is a diagram showing a third example of a debug screen in the simulation system 500. [Figure 14] FIG. 10 is a diagram showing a fourth example of a debug screen in the simulation system 500. [Figure 15] 10 is a flowchart showing an example of a simulation recording process performed by the simulation system 500. [Figure 16] 10 is a flowchart showing an example of a debugging process performed by the simulation system 500. [Figure 17]It is a flowchart showing an example of a comparison process between the simulation result of a program by a simulation system 500 and the execution result of the program in a real environment.
Embodiments for Carrying Out the Invention
[0039] Hereinafter, embodiments of the technical idea according to the present disclosure will be described while referring to the drawings. In the following description, the same parts are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed descriptions thereof will not be repeated.
[0040] <A. Application Example> First, referring to FIGS. 1 and 2, an example of a scene to which the present invention is applied will be described.
[0041] (a. Equipment to be Simulated) FIG. 1 is a diagram showing an example of equipment whose operation can be simulated by a simulation system according to the present embodiment. The simulation system 500 (see FIG. 5) according to the present embodiment can, as an example, simulate the operation of any equipment used in factory FA (Factory Automation) or the like. The simulation system 500 can simulate the operations of a robot arm, a belt conveyor, a rotary knife, sensors, other arbitrary equipment, and combinations thereof.
[0042] The equipment 150 shown in FIG. 1 is a composite equipment including a conveyor 151 and a rotary knife 154. The equipment 150 has a function of cutting a sheet 158 flowing on the conveyor 151 to a predetermined length. As its constituent parts, the equipment 150 includes a conveyor 151, a motor 152, a motor control device 153, a rotary knife 154, a motor 155, a motor control device 156, and a sensor 157.
[0043] Conveyor 151 transports sheets 158. Motor 152 is connected to a main shaft for rotating the conveyor, and drives conveyor 151. Motor control device 153 controls the speed, torque, etc. of motor 152.
[0044] The rotary knife 154 has a knife mounted on a rotating roller. As the roller rotates, the knife cuts the sheet 158 traveling on the conveyor 151. A motor 155 is connected to the roller of the rotary knife 154 and drives the rotary knife 154. A motor control device 156 controls the speed, torque, etc. of the motor 155.
[0045] A sensor 157 detects a cutting position 159 on the sheet 158. The rotary knife 154 cuts the sheet at the cutting position 159 detected by the sensor 157.
[0046] The motor control devices 153, 156, and the sensor 157 may be connected to a programmable logic controller (PLC) 200 (see FIG. 3 ). In this case, the PLC 200 may read a signal from the sensor 157 and control the rotary knife 154 based on the signal. The PLC 200 controls the device 150 based on an installed program.
[0047] The simulation system 500 reproduces, within a simulation, the operation of the PLC 200 in which a program is installed and the operation of the device 150 controlled by the PLC 200. A user can debug the PLC program by checking the operation of the device 150 within the simulation. In one aspect, the program that the simulation system 500 can simulate may be an IEC program. An IEC program is a program that conforms to the IEC 61131-3 standard and includes a ladder program, ST (Structured Text), etc.
[0048] (b. Simulation system functions) Fig. 2 is a diagram showing an example of how a simulation is executed by the simulation system 500. The functions of the simulation system 500 will be described with reference to Fig. 2. The simulation system 500 has a simulation recording function and a program debugging function using the recorded simulation results. In the following explanation, the functions of the simulation system 500 will be described using the device 150 as an example.
[0049] (b-1. Simulation recording function) First, the simulation recording function will be described. As described above, the simulation system 500 reproduces the operation of the PLC 200 in which the program is installed and the operation of the device 150 controlled by the PLC 200 in a simulation in 3D space.
[0050] At this time, the simulation system 500 records a simulation log 250. The simulation log 250 includes position information 252 of objects in the 3D space for each execution time (or execution timing) of the program, and values 254 of program variables for each execution time. The objects in the 3D space here may include, for example, equipment in the 3D space, parts that make up the equipment, workpieces, any other objects, and combinations thereof.
[0051] In some aspects, the execution time (or execution timing) may be defined by the steps of the program instructions and the number of times (cycles) the program is repeatedly executed. A step refers to, for example, one instruction unit of the program or one line of instructions in a program written in an editor (such as one instruction in a ladder program or one line of ST written in an editor). When one instruction or one line of instructions in the program is executed (such as when one instruction in a ladder program or one line of ST written in an editor is executed), it is considered that one step has progressed. The step interval may be determined by the instruction cycle of the PLC 200. As an example, assume that a program contains 10 steps of instructions. In this case, when 10 steps of instructions are executed, the program is considered to have been executed once (a cycle), and when 100 steps of instructions are executed, the program is considered to have been executed 10 times (a cycle). In other aspects, the execution time (or execution timing) may be defined by any predetermined time interval (such as 1 second or 100 milliseconds).
[0052] In the example shown in FIG. 2, the simulation system 500 records, as a simulation log 250, position information 252 of an object in 3D space and values 254 of program variables during execution time (3420 cycles, 118 steps) in association with each other.
[0053] 2, the object position information 252 in 3D space includes the angle of the main shaft 240 (the shaft of the conveyor connected to the motor 152), the angle of the secondary shaft 245 (the roller of the rotary knife 154), the cutting position 248 (the position of the blade), and the positions of other objects.
[0054] The program variable values 254 include the values of one or more variables referenced by the program 253 installed in the PLC 200. In the example shown in Fig. 2, the program variable values 254 include the values of GEAROMPOS1_STARTSYNC, GEAROMPOS1_INSYNC, MC_Axis000.Act.Pos, MC_Axis001.Act.Pos, and other variable values.
[0055] (b-2. Debugging function) Next, the debug function will be described. The simulation system 500 can replay the simulation based on the simulation log 250 and display the simulation scene for each step on the screen 251.
[0056] The screen 251 includes a display 260 of a 3D space, a display 265 of a program, position information 252 of an object in the 3D space for each execution time, and values 254 of variables of the program for each execution time.
[0057] The simulation system 500 also has a function of playing back or reversing the simulation while pausing at each step based on an operational input from the user.
[0058] For example, suppose the simulation scene is at a first execution time. In this case, a screen 251 displays a 3D space display 260, a program display 265, position information 252 of an object in the 3D space, and values 254 of program variables at the first execution time.
[0059] Based on an operation input from the user, assume that the simulation scenario advances (or retreats) one step from the first execution time and changes to the second execution time. In this case, on screen 251, the display 260 of the 3D space, the display 265 of the program, the position information 252 of the object in the 3D space, and the value 254 of the variable of the program are displayed at the second execution time. In a certain situation, the display 265 of the program may include the execution state of the program substituted with the value 254 of the variable of the program.
[0060] By referring to screen 251, the user can simultaneously check the display 260 of the 3D space, the display 265 of the program, the position information 252 of the object in the 3D space, and the value 254 of the variable of the program. Thereby, the user can easily debug the program while checking the operation of device 150.
[0061] <B. System Configuration> Next, referring to FIGS. 3 to 5, the overall image of the system to be simulated by simulation system 500, the hardware configuration of the device operating as simulation system 500, and the functional configuration of simulation system 500 will be described.
[0062] FIG. 3 is a diagram showing an example of the unit configuration of control system 2 including devices to which the simulation technology according to the present embodiment can be applied. Device 150 shown in FIG. 1 can be realized as a part of control system 2, for example.
[0063] Control system 2 includes, as an example, PLC 200, servo motor drivers 531 and 532 and IO remote terminal 5 connected to PLC 200 via field network 22, robot controller 310, and IO devices (sensors 6 and encoders 236, 238, etc.) provided in the field.
[0064] The PLC 200 includes an arithmetic unit 13 that performs main arithmetic processing, one or more IO units 14, and a specialized unit 17. These units are configured to be able to exchange data with each other via a system bus 81, and receive power from a power supply unit 12. A simulation device 100 can be connected to the arithmetic unit 13.
[0065] The apparatus 100 can operate as a simulation system 500. The apparatus 100 can also install a program whose operation has been verified by simulation into the arithmetic unit 13. The arithmetic unit 13 can control each device included in the control system 2 based on the installed program. The apparatus 100 can be connected to the arithmetic unit 13 via a network 80.
[0066] The IO unit 14 collects detection values 61, 237, and 239 from IO devices including a sensor 6, encoders 236, 238, and the like. For example, the sensor 6 may be a sensor 157 for detecting a cutting position 159 of a sheet 158 shown in FIG. 1 . The encoders 236 and 238 may also be attached to a motor 152 for driving the conveyor 151 or a motor 155 for driving the rotary knife 154. The detection value from each IO device is set (written) to a corresponding bit in a memory included in the IO unit 14, for example.
[0067] The arithmetic unit 13 executes the calculation of the control program using the values collected by the IO unit 14, and sets (writes) the value of the calculation result to the corresponding bit of the IO unit 14. The peripheral equipment or IO device operates by referring to the value of each bit of the IO unit 14. In this way, the PLC 200 can control the robot, conveyor, or other controlled object while exchanging data with the IO device and peripheral equipment via the IO unit 14.
[0068] The special unit 17 has functions that are not supported by the IO unit 14, such as input / output of analog data, temperature control, and communication using a specific communication method.
[0069] To the field network 22, for example, a robot controller 310, servo motor drivers 531 and 532, an IO remote terminal 5, and the like may be connected.
[0070] The IO remote terminal 5 basically performs processing related to general input / output processing, similar to the IO unit 14. More specifically, the IO remote terminal 5 includes a communication coupler 52 for performing processing related to data transmission in the field network 22, and one or more IO units 53. These units are configured to be able to exchange data with each other via an IO remote terminal bus 51.
[0071] Servo motor drivers 531, 532 are connected to arithmetic unit 13 via field network 22 and drive servo motors 41, 42 in accordance with command values from arithmetic unit 13. Specifically, servo motor drivers 531, 532 receive command values such as a position command value, a speed command value, and a torque command value from PLC 200 at regular intervals such as a control period. Arithmetic unit 13 may generate these command values based on detection values 237, 239 from encoders 236, 238. In one aspect, servo motors 41, 42 may be used as motor 155 that drives rotary knife 154.
[0072] The calculation unit 13 can refer to the detection values from the IO device described above and execute a predetermined control program to cause the robot hand 210 to perform operations such as picking and placing a workpiece and holding the workpiece.
[0073] Specifically, the arithmetic unit 13 generates a control command 211 for the robot arm and a control command 222 for the robot hand 210, and outputs these control signals to the robot hand 210 via the robot controller 310. When generating the control command 211, the arithmetic unit 13 may refer to the state value of the robot hand 210 in addition to the detection value 61 from the IO device described above. The robot arm may include any number of servo motors, such as servo motors 1301 to 1304, for example.
[0074] The simulation system 500 may simulate the entire control system 2 described above, or may simulate only a portion of the configuration included in the control system 2.
[0075] 4 is a diagram illustrating an example of a hardware configuration of apparatus 100. Apparatus 100 can operate as simulation system 500. In one aspect, simulation system 500 may be realized by a plurality of apparatuses 100, a system including at least a portion of the hardware configuration of apparatus 100, a virtual machine on a cloud environment including at least a portion of the hardware configuration of apparatus 100, or the like.
[0076] The device 100 includes, as its main components, a processor 102 that executes an operating system (OS) and programs that run on the OS, a main memory 104 that provides a working area for storing data necessary for the processor 102 to execute the programs, an operation unit 106 (operation reception unit) that receives user operations such as a keyboard and a mouse, an output unit 108 that outputs processing results such as a display 109, various indicators, and a printer, a network interface 110 that is connected to various networks including the network 80, an optical drive 112, a local communication interface 116 that communicates with external devices, and storage 111. These components are connected to each other via an internal bus 118 or the like so as to enable data communication.
[0077] The device 100 has an optical drive 112 and may read various programs from a computer-readable recording medium 114, including an optical recording medium (e.g., a DVD (Digital Versatile Disc)) that non-transiently stores computer-readable programs, and install the various programs in storage 111, etc.
[0078] The various programs executed by the device 100 may be installed on the device 100 via a computer-readable recording medium 114, or may be installed on the device 100 via a network interface 110 from a server device or the like (not shown) on the network.
[0079] The storage 111 is configured, for example, with a hard disk drive (HDD) or a flash solid state drive (SSD), and stores programs to be executed by the processor 102. More specifically, the storage 111 stores an OS 120 and an integrated development environment 130. The integrated development environment 130 can be realized as an application that runs on the OS 120.
[0080] The integrated development environment 130 provides the functionality of the simulation system 500 described with reference to Fig. 1. In other words, the processor 102 executes the integrated development environment 130 deployed in the main memory 104, thereby realizing the functionality of the simulation system 500.
[0081] In one aspect, the simulation recording function and the debugging function described with reference to FIG. 1 may be implemented as an add-in to the integrated development environment 130.
[0082] In one aspect, device 100 may implement some or all of the functions of integrated development environment 130 using an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or the like.
[0083] Fig. 5 is a diagram illustrating an example of the functional configuration of simulation system 500. Each functional configuration illustrated in Fig. 5 can be realized as a program component. In this case, each functional configuration can operate as software on the hardware of device 100.
[0084] The simulation system 500 includes, as its functional configuration, a 3D shape display unit 510, a PLC simulation unit 520, an IEC program editing unit 530, a variable memory graph display unit 540, a data management unit 550, an actual machine / simulation data comparison unit 560, and a repository 570.
[0085] The 3D shape display unit 510 renders the simulation in 3D space on a display. To achieve this, the 3D shape display unit 510 includes a 3D shape reading unit 511, a 3D shape rendering unit 512, and a 3D memory display unit 513.
[0086] The 3D shape reading unit 511 reads a CAD file 580 used in the simulation and converts the CAD file 580 so that it can be drawn by the 3D shape drawing unit 512. In one aspect, the 3D shape reading unit 511 may read the CAD file 580 from the storage 111. In another aspect, the 3D shape reading unit 511 may read the CAD file 580 that has been input from outside via the network interface 110, the optical drive 112, or the local communication interface 116.
[0087] The 3D shape drawing unit 512 displays the objects in the 3D space (data acquired from the 3D shape reading unit 511) and the movements of the objects on the display 109. The objects in the 3D space may include not only the devices included in the control system 2 but also works and the like. For example, the 3D shape drawing unit 512 displays a representation 260 of the 3D space on the display 109.
[0088] The 3D memory display unit 513 displays position information 252 of objects in 3D space for each execution time on the display 109. The 3D memory display unit 513 also reads the simulation log 250 from the repository 570 to reproduce a simulation recorded in the past. In one aspect, the 3D memory display unit 513 may use the drawing function of the 3D shape drawing unit 512 when reproducing a simulation recorded in the past. In one aspect, the 3D memory display unit 513 may draw all of the screens shown in FIGS. 2 and 11 to 14.
[0089] PLC simulation unit 520 executes a program installed in PLC 200 in a simulation. To achieve this, PLC simulation unit 520 includes step execution unit 521. In some aspects, PLC simulation unit 520 may also have a display function for playing back the simulation. In this case, PLC simulation unit 520 may render all of the screens shown in FIGS. 2 and 11 to 14.
[0090] The step execution unit 521 executes the program step by step. The step execution unit 521 can also replay or reverse play the simulation log 250 recorded in the repository 570 step by step. Furthermore, the step execution unit 521 displays the values 254 of the program variables for each execution time on the display 109. The 3D shape display unit 510 can update the display of the object in the 3D space based on the execution position (step position) and the number of executions (number of cycles) of the program acquired from the step execution unit 521.
[0091] IEC program editing unit 530 accepts an operation to edit the program via operation unit 106. In a certain aspect, step execution unit 521 may immediately reflect the changes to the program made by IEC program editing unit 530 and execute a simulation.
[0092] The variable memory graph display unit 540 can display on the display 109 a graph 1310 (see FIG. 13) showing changes in the values of variables based on the variable memory 572 recorded in the repository 570.
[0093] The data management unit 550 manages the simulation log 250. To achieve this, the data management unit 550 includes a data input unit 551, a data reading unit 552, a data difference extraction unit 553, and a data difference recording unit 554. In one aspect, the data management unit 550 may acquire simulation recording settings via the operation unit 106. The simulation recording settings include designating objects to be recorded, designating variables to be recorded, and designating a period for executing the simulation. The data management unit 550 may record the simulation log 250 based on the acquired settings. In one aspect, the period for executing the simulation may be set by the start time and end time of the simulation. In another aspect, the period for executing the simulation may be set by the number of steps and cycles of the program at the start and the number of steps and cycles of the program at the end.
[0094] The data input unit 551 acquires position information 252 of an object in 3D space for each execution time from the 3D shape display unit 510. In addition, the data reading unit 552 acquires values 254 of program variables for each execution time from the PLC simulation unit 520.
[0095] During debugging (when reproducing a recorded simulation), the data reading unit 552 passes the data in the 3D simulation memory 571 to the 3D shape display unit 510. Similarly, during debugging, the data reading unit 552 passes the data in the variable memory 572 to the PLC simulation unit 520.
[0096] The data difference extraction unit 553 extracts the difference for each execution time of the data (position information 252 of the object in 3D space and value 254 of the program variable) acquired by the data input unit 551. More specifically, the data difference extraction unit 553 compares the position information 252 of the object in 3D space at the first execution time with the position information 252 of the object in 3D space at the second execution time to extract the difference in the object position. Similarly, the data difference extraction unit 553 compares the value 254 of the program variable at the first execution time with the value 254 of the program variable at the second execution time to extract the difference in the variable value.
[0097] The data difference recording unit 554 stores the differences in the object positions in the 3D simulation memory 571 as part of the simulation log 250. The data difference recording unit 554 also stores the differences in the variable values in the variable memory 572 as part of the simulation log 250.
[0098] If the position information 252 of all objects in 3D space and the values 254 of program variables were stored in the repository 570 for each step, the simulation log 250 would become enormously large. Therefore, the data difference extraction unit 553 and the data difference recording unit 554 save the storage capacity of the repository 570 by storing in the repository 570 only the differences from the previous record.
[0099] The real machine / simulation data comparison unit 560 compares the execution results of the program in a simulation with the execution results of the program in a real environment. To achieve this, the real machine / simulation data comparison unit 560 includes a synchronization unit 561, a data comparison unit 562, and a display unit 563.
[0100] In one aspect, the PLC simulation unit 520 may associate timestamps, object position information for each execution time, and program variable values in the real environment based on camera images and signals obtained from sensors, and output the associated data to the data management unit 550. The real machine / simulation data comparison unit 560 may compare the execution results of the program in the simulation with the execution results of the program in the real environment by playing back the simulation log 250 stored in the repository 570 and a log of the real environment (not shown).
[0101] The synchronization unit 561 matches the cycle of the simulation with the cycle of the real environment. More specifically, it associates the execution time (cycles and steps) of the simulation with the execution time (timestamps, or steps and cycles of the program in the real environment) of the real environment.
[0102] The data comparison unit 562 compares the execution results of the program in a simulation with the execution results of the program in a real environment for the same execution time.
[0103] Display unit 563 may display the execution result of the program in a simulation and the execution result of the program in a real environment for the same execution time. In one aspect, display unit 563 may display on display 109 the difference between the execution result of the program in a simulation and the execution result of the program in a real environment. In another aspect, display unit 563 may highlight the difference between the execution result of the program in a simulation and the execution result of the program in a real environment. This allows the user to easily modify the program to suit the real environment.
[0104] The repository 570 records the simulation log 250. The repository 570 includes a 3D simulation memory 571 and a variable memory 572. In one aspect, the repository 570 may be a repository of a version control system.
[0105] The 3D simulation memory 571 stores, for each step, the position information 252 of the objects in the 3D space associated with the execution time.
[0106] The variable memory 572 stores, for each step, the value 254 of the variables of the program associated with the execution time.
[0107] Also, the repository 570 can record the execution log of the program in the actual environment. In this case, the repository 570 stores, for each step, the position information of the objects in the actual environment associated with the execution time of the actual environment. Similarly, the repository 570 stores, for each step, the value of the variables of the program in the actual environment associated with the execution time of the actual environment.
[0108] <C. Procedure for Recording Simulation Log> Next, referring to FIGS. 6 to 10, the procedure for the simulation system 500 to record the simulation log 250 will be described. In the example shown in FIGS. 6 to 10, the simulation system 500 records the simulation log 250 of the device 150.
[0109] FIG. 6 is a diagram showing a first example of the state of the simulation. In the example shown in FIG. 6, the simulation system 500 is executing the program 611 within the simulation. The movement and position of each object are reproduced in the 3D space 601.
[0110] The 3D space 601 includes each object in the 3D space at the execution time (1920 cycles, 118 steps). The execution time (1920 cycles, 118 steps) means, in other words, that the number of times the PLC 200 executes the program 611 is the 1920th time, and it indicates the point when the PLC 200 executes the 118th step of the program 611.
[0111] Each time the PLC 200 executes one step of the program 611 in the simulation, the simulation system 500 stores the position information of the object in the 3D space 601 and the values of the program variables for each execution time in the repository 570 as the simulation log 250. More specifically, the simulation system 500 stores in the repository 570 the difference information from the previous record.
[0112] In the example shown in FIG. 6, the simulation system 500 stores position information 602 of an object in 3D space and values 612 of program variables during execution time (1920 cycles, 118 steps) as a simulation log 250 in the repository 570.
[0113] Fig. 7 is a diagram showing a second example of the state of the simulation. The example shown in Fig. 7 shows the execution state of the program 611 one step forward from the state shown in Fig. 6. A 3D space 601 includes each object in the 3D space during the execution time (1920 cycles, 119 steps).
[0114] As the PLC 200 executes one step of the program 611 in the simulation, the simulation system 500 attempts to store the position information 702 of the object in 3D space and the value 712 of the program variable during the execution time (1920 cycles, 119 steps) as a simulation log 250 in the repository 570.
[0115] At this time, the only difference between the position information 602 of the object in the 3D space and the value 612 of the program variable at the execution time (1920 cycles, 118 steps) and the position information 702 of the object in the 3D space and the value 712 of the program variable at the execution time (1920 cycles, 119 steps) is "GEAROMPOS1_INSYNC." In this case, the simulation system 500 stores the value of "GEAROMPOS1_INSYNC," which is the difference, as the simulation log 250 in the repository 570. In this way, the simulation system 500 can save the storage capacity of the repository 570 by storing the difference from the previously recorded simulation log 250 in the repository 570.
[0116] Fig. 8 is a diagram showing a third example of the state of the simulation. The example shown in Fig. 8 shows the execution state of the program 611 1500 cycles after the state shown in Fig. 6. A 3D space 601 includes each object in the 3D space at the execution time (3420 cycles, 118 steps).
[0117] The simulation system 500 repeatedly stores the simulation log 250 in the repository 570 each time the PLC 200 executes one step of the program 611 in the simulation. At this time, the simulation system 500 stores in the repository 570 only the difference from the previously recorded simulation log 250.
[0118] At the time shown in Figure 8, repository 570 stores position information 802 of objects in 3D space and values 812 of program variables at an execution time 1500 cycles ahead (3420 cycles, 118 steps) from the time shown in Figure 6 as simulation log 250 in repository 570.
[0119] Figure 9 is a diagram showing a first example of data stored in repository 570. In the example shown in Figure 9, repository 570 stores simulation log 250. Simulation log 250 includes values 901 of IEC variables, values 902 of robot variables, step and cycle counts 903 of the IEC program, and position information 252 of objects in 3D space.
[0120] The IEC variable values 901 and the robot variable values 902 are included in the program variable values 254. The IEC variable values 901 include the values of one or more variables referenced in the program executed by the PLC 200. The robot variable values 902 include variables for controlling the robot hand 210, etc.
[0121] The IEC program step and cycle count 903 includes the number of times (cycles) the program has been executed repeatedly and the most recently executed step. The IEC program step and cycle count 903 is associated with the object position information 252 in 3D space and the program variable values 254 as the simulation execution time.
[0122] The values of the IEC variables 901, the values of the robot variables 902, the step and cycle counts 903 of the IEC program, and the object position information 252 are stored in the repository 570 as difference information of the simulation log 250 for each step.
[0123] In one aspect, if there is no difference between the simulation log 250 previously saved in the repository 570 and the current simulation log 250, the simulation system 500 may not need to save the current simulation log 250 in the repository 570. In another aspect, if there is no difference between the simulation log 250 previously saved in the repository 570 and the current simulation log 250, the simulation system 500 may save the IEC program step and cycle count 903 in the repository 570 without saving the IEC variable values 901, the robot variable values 902, and the object position information 252 in the 3D space in the repository 570.
[0124] Fig. 10 is a diagram showing a second example of data stored in repository 570. In the example shown in Fig. 10, repository 570 stores a simulation log 250 of a program and a log 1050 of the actual environment of the program.
[0125] The real environment log 1050 includes real environment IEC variable values 1011, real environment robot variable values 1012, real environment IEC program step and cycle counts 1013, and real environment object position information 1014.
[0126] The real-world IEC variable values 1011 include the values of one or more variables referenced in the program executed by the PLC 200 when the program is executed in the real-world environment.
[0127] The values 1012 of the robot variables in the real environment include variables for controlling the robot hand 210 and the like when the program is executed in the real environment.
[0128] The count 1013 of the steps and cycles of the IEC program in the actual environment indicates the execution time when the program is executed in the actual environment. In a certain aspect, the count 1013 of the steps and cycles of the IEC program in the actual environment may include a time stamp calculated from the execution cycle of the program of the PLC 200 or the like. In another aspect, the simulation system 500 may determine that the time when a certain sensor detects the operation of the workpiece or equipment is the first step of the program in the actual environment. The simulation system 500 can synchronize the execution timing of the program in the simulation and the execution timing of the program in the actual environment by associating the first step of the program in the actual environment with the first step of the program in the simulation.
[0129] The position information 1014 of the object in the actual environment indicates the position of the object when the program is executed in the actual environment. In a certain aspect, the position information 1014 of the object in the actual environment can be detected using a camera (or 3D camera), sensors, and the like. The simulation log 250 and the log 1050 of the actual environment are referred to by the actual machine - simulation data comparison unit 560. The actual machine - simulation data comparison unit 560 can compare the execution result of the program in the simulation with the execution result of the program in the actual environment by referring to the simulation log 250 and the log 1050 of the actual environment.
[0130] In a certain aspect, the simulation system 500 may create a plurality of branches in the version management system and save the simulation log 250 and the log 1050 of the actual environment in each branch.
[0131] <D. Procedure for Debugging the Program> Next, referring to FIGS. 11 to 14, the procedure for debugging the program using the simulation system 500 will be described. In the example shown in FIGS. 11 to 14, the simulation system 500 reproduces the simulation log 250 of the device 150 recorded in the past step by step.
[0132] 11 is a diagram showing a first example of a debug screen in the simulation system 500. The screen 1100 includes a simulation scene reproduced based on the simulation log 250 of the device 150 recorded in the past. The screen 1100 is displayed on the display 109. The screen 1100 may include an operation UI 1101 for performing any operation such as replaying, reversing, pausing, and stopping the simulation scene for each step. In this case, the user can update the simulation scene for each step by operating the operation UI 1101.
[0133] Screen 1100 shows sheet 158 that has not been cut at cutting position 1120. In such a case, the user can investigate the cause of the program malfunction by rewinding the simulation scene slightly earlier via operation UI 1101 (for example, before or after cutting of sheet 158 at cutting position 1130, which is one position before cutting position 1120), and then playing the scene again.
[0134] For example, screen 1100A shows a scene before cutting of sheet 158 at cutting position 1130. Screen 1100B shows a scene when sheet 158 is being cut at cutting position 1130. Screen 1100C shows a scene after cutting of sheet 158 at cutting position 1130. Looking at screens 1100A to 1100C, it can be seen that after cutting of sheet 158 at cutting position 1130, blade 1110 has not yet reached cutting position 1120 of sheet 158. In other words, it can be seen that the rotational speed of driven shaft 245 is slower than the speed at which sheet 158 is advancing. In one aspect, simulation system 500 may simultaneously display successive simulation scenes, such as screens 1100A to 1100C, on display 109.
[0135] In this way, by playing back or reversing the simulation screen for each step, the user can easily identify problems with the placement and operation of the equipment, and can modify the program based on the identified problems.
[0136] 12 is a diagram showing a second example of a debug screen in the simulation system 500. The screen 1200 includes a simulation scene 1201 (display of 3D space) reproduced based on the simulation log 250 of the device 150 recorded in the past, a program 1202, object position information 1203, and program variable values 1204. In one aspect, the simulation system 500 (or the PLC simulation unit 520) may accept an input for selecting variables to be traced. Based on the acceptance of the input for selecting variables to be traced, the simulation system 500 (or the PLC simulation unit 520) may include only the values of the variables to be traced in the program variable values 1204.
[0137] The user can update the simulation scene 1201 for each step by operating the operation UI 1101 to play back or reverse the simulation screen. Every time the simulation scene 1201 is updated for each step, the program 1202, object position information 1203, and program variable values 1204 are also updated.
[0138] For example, if a user finds a problem in a simulation scene 1201, the user can check the simulation scenes 1201 for several steps before and after the problematic scene by operating the operation UI 1101. Furthermore, the user can easily grasp the problem with the program by simultaneously checking the program 1202, object position information 1203, and program variable values 1204 for several steps before and after the problematic scene.
[0139] A user can easily debug a program by checking at least the simulation scene 1201 and the program variable values 1204. More specifically, if a user finds an abnormality in the simulation scene 1201 (3D space), the user can identify the variable values that cause the abnormality in the 3D space by checking the program variable values 1204.
[0140] Furthermore, the user can debug the program in more detail by checking object position information 1203, which includes numerical information, in addition to simulation scene 1201 and program variable values 1204. For example, in the example shown in Fig. 12, main shaft 240 and slave shaft 245 need to rotate in synchronization with each other in order to cut sheet 158 at cut position 159. If there is a misalignment in the rotation timing between main shaft 240 and slave shaft 245, the user can grasp the specific amount of misalignment in the rotation timing by checking object position information 1203. The user can modify the program (such as the values to be assigned to variables) based on the amount of misalignment in the rotation timing.
[0141] Furthermore, the user can debug the program in more detail by checking program 1202 in addition to simulation scene 1201 and program variable values 1204, or in addition to simulation scene 1201, object position information 1203, and program variable values 1204. More specifically, if the user discovers an abnormality in simulation scene 1201 (3D space), the user can identify the problematic program code and variable values by checking program variable values 1204 and program 1202 (source code).
[0142] As described above, the operation UI 1101 can accept a step-by-step simulation playback operation, a step-by-step simulation reverse playback operation, a step-by-step simulation pause operation, and a simulation stop operation. In one aspect, the operation UI 1101 may accept a one-cycle (or one-step) playback operation, a one-cycle (or one-step) reverse playback operation, a breakpoint setting operation, a slow playback operation, and a slow reverse playback operation.
[0143] Suppose the user performs a simulation playback operation via the operation UI 1101. In this case, the simulation scene 1201 is updated (played back) for each step of the program. Furthermore, the object position information 1203 and the program variable values 1204 are also updated for each step of the program (updated to the values of the next step). This allows the user to clearly understand when a problem occurs in the simulation scene 1201. Furthermore, the user can accurately understand the position of each object by checking the object position information 1203 at the time when the problem occurs. Similarly, the user can identify the cause of the program malfunction by checking the program variable values 1204 at the time when the problem occurs.
[0144] Suppose the user performs a reverse playback operation of the simulation via the operation UI 1101. In this case, the simulation scene 1201 is updated (played backward) for each step of the program. In addition, the object position information 1203 and the program variable values 1204 are also updated for each step of the program (updated to the values of the previous step). This allows the user to identify the cause of the problem by tracing back from when the problem occurred in the simulation scene 1201.
[0145] In a certain situation, when a user performs a play or reverse operation of a simulation via the operation UI 1101 (for example, when the play button (reverse button) is pressed once), the simulation scene 1201, object position information 1203, and program variable values 1204 may be continuously played (or continuously reverse played) in step units.
[0146] In another aspect, when a user performs a play or reverse operation of a simulation via the operation UI 1101 (for example, when the play button (reverse button) is pressed once), the simulation scene 1201, object position information 1203, and program variable values 1204 may be played (reverse played) for just one step.
[0147] Suppose the user performs an operation to pause (or stop) the simulation via the operation UI 1101. In this case, the simulation scene 1201, object position information 1203, and program variable values 1204 are stopped at the currently executed program step. This allows the user to check the position of each object and the value of each variable in detail at any step.
[0148] Suppose the user performs an operation to play the simulation frame by frame (including frame by frame reverse playback) via the operation UI 1101. In this case, the simulation scene 1201, object position information 1203, and program variable values 1204 are played back slowly in program step units. This allows the user to check in detail how the position of each object and the value of each variable have changed as the program progresses through each step.
[0149] Suppose the user performs an operation to play back one cycle (or one step) of the simulation via the operation UI 1101. In this case, the simulation scene 1201, object position information 1203, and program variable values 1204 are played back for one cycle (or one step). By using the one-cycle (or one-step) playback function, the user can check in detail the changes in the position of each object and the value of each variable while playing back the simulation.
[0150] Suppose the user performs an operation to play the simulation in reverse for one cycle (or one step) via the operation UI 1101. In this case, the simulation scene 1201, object position information 1203, and program variable values 1204 are played in reverse for one cycle (or one step). By using the one-cycle (or one-step) reverse playback function, the user can check in detail the changes in the position of each object and the value of each variable while playing the simulation in reverse.
[0151] Suppose a user sets a breakpoint in a program and plays back a simulation via the operation UI 1101. In this case, the simulation scene 1201, object position information 1203, and program variable values 1204 continue to play back, pausing at the program step where the breakpoint was set. In one aspect, the breakpoint setting function may be provided in the display of the program 1202, 1320, or 1410.
[0152] Suppose the user performs an operation to play the simulation in slow motion via the operation UI 1101. In this case, the simulation scene 1201, object position information 1203, and program variable values 1204 are played back in slow motion. In some situations, the user may be able to input a setting for the playback speed of the slow motion playback via the operation UI 1101.
[0153] Suppose the user performs an operation to play the simulation in slow reverse via the operation UI 1101. In this case, the simulation scene 1201, object position information 1203, and program variable values 1204 are played in slow reverse. In some situations, the user may be able to input a setting for the playback speed of the slow reverse playback via the operation UI 1101.
[0154] In a certain situation, when the simulation scene 1201 changes (the simulation is played back, played back in reverse, or frame-by-frame), and there is a change in the object position information 1203 and the program variable value 1204, the simulation system 500 may highlight the changed value (the object position value or the variable value).
[0155] 13 is a diagram showing a third example of a debug screen in the simulation system 500. A screen 1300 includes a variable graph 1310 generated based on previously recorded program variable values 254, and a program 1320 whose state has been reproduced based on previously recorded program variable values 254.
[0156] In one aspect, the variable graph 1310 and program 1320 may be displayed along with all or part of the simulation scene 1201, object position information 1203, and program variable values 1204.
[0157] Simulation system 500 may update the value of each variable displayed in program 1320 for each step. In one aspect, simulation system 500 may update variable graph 1310 and program 1320 based on receiving a step replay or reverse replay operation input from a user or based on an update of a simulation scene. For example, simulation system 500 may replay the operation of the program for each execution time by substituting variables into the program.
[0158] The user can easily identify problems in the program by simultaneously checking the timing of changes in the values of each variable and the changes in the program state (program operation).
[0159] 13, a value for each execution time is assigned to each variable of program 1320. For example, if the execution time is "1920 cycles, 118 steps," each variable of program 1320 is assigned a value at the time when the program has been executed for the 1920th cycle and the processing for the 118th step has been executed.
[0160] The values substituted for each variable in the program 1320 are updated for each step. For example, when the simulation scene 1201 is updated by one step, the values substituted for each variable in the program 1320 are also updated by one step.
[0161] In one aspect, when there is a change in the value assigned to each variable in the program 1320, the simulation system 500 may highlight the changed value, the name of the variable whose assigned value has changed, or both.
[0162] In another aspect, when one or more variables included in the program 1320 are selected, the simulation system 500 may generate a graph 1310 of variables including the selected variable.
[0163] Furthermore, in another aspect, the simulation system 500 may highlight variables that are graphed in the program 1320. In the example shown in Fig. 13, the simulation system 500 may highlight variables that correspond to the "mark detection signal" and the "cutting completion signal" in the variable graph 1310 in the program 1320.
[0164] The user can visually confirm the change in the variable by referring to the variable graph 1310. The user can also grasp the exact amount of change in the variable value by referring to the value of the highlighted variable (variable that has changed) in the program 1320.
[0165] 14 is a diagram showing a fourth example of a debug screen in the simulation system 500. The screen 1400 includes a program 1410, a flowchart 1420 of the program, and a graph 1430 of variables generated based on previously recorded values 254 of the program variables. Note that the program 1410 may be one in which values are assigned to variables at each step, similar to the program 1320.
[0166] In one aspect, a program 1410, a program flowchart 1420, and a variable graph 1430 may be displayed along with all or part of the simulation scene 1201, object position information 1203, and program variable values 1204.
[0167] The simulation system 500 may update the values of each variable displayed in the program 1410 based on receiving a step forward or reverse operation input from the user or based on an update of the simulation scene. The simulation system 500 may also highlight a process in the flowchart 1420 based on receiving a step forward or reverse operation input from the user or based on an update of the simulation scene. The simulation system 500 may also update the variable graph 1430 based on receiving a step forward or reverse operation input from the user or based on an update of the simulation scene.
[0168] Users can easily identify problems in a program by simultaneously checking the timing of changes in the values of each variable, changes in the program's state (program operation), and the processing being executed on the flowchart.
[0169] For example, each block of the flowchart 1420 may be associated with each POU of the program 1410. In one aspect, the simulation system 500 may generate the flowchart 1420 from the program 1410. In another aspect, the simulation system 500 may receive an operation input from a user for associating each block of the flowchart 1420 with each POU of the program 1410. In another aspect, the simulation system 500 may highlight, in the program 1410, a POU corresponding to a block of the currently executed process of the flowchart 1420. In yet another aspect, each block of the flowchart 1420 may be configured to be selectable, and the simulation system 500 may display, in the program 1410, a POU corresponding to a block selected on the flowchart 1420, or may highlight, in the program 1410, a POU corresponding to a block selected on the flowchart 1420.
[0170] The program 1410, program flowchart 1420, and variable graph 1430 may be updated in steps. For example, each time the simulation scene advances or retreats by one step, the display of the program 1410, program flowchart 1420, and variable graph 1430 also advances or retreats by one step.
[0171] 11 to 14 may be combined in any manner and displayed on display 109. For example, simulation system 500 may display on display 109 a simulation scene 1201, a program 1320 whose state is reproduced based on previously recorded program variable values 254, a flowchart 1420, and a variable graph 1430.
[0172] <E.フローチャート> 15 to 17, a description will be given of a processing procedure for recording a simulation result and a debugging process performed by simulation system 500. In one aspect, processor 102 may load a program for performing the processes of FIGS. 15 to 17 (any program such as integrated development environment 130) from storage 111 into main memory 104 and execute the program. In another aspect, some or all of the processes may be realized as a combination of circuit elements configured to perform the processes.
[0173] FIG. 15 is a flowchart showing an example of a simulation recording process performed by the simulation system 500.
[0174] In step S1510, the simulation system 500 starts the simulation, for example, based on receiving a simulation start operation from the user.
[0175] In step S1520, the simulation system 500 starts recording data in the 3D simulation memory 571 and the variable memory 572.
[0176] In step S1530, the simulation system 500 repeatedly executes the processes from step S1540 onwards until the simulation is completed.
[0177] In step S1540, the simulation system 500 acquires the position information 252 of the object in the 3D space and the value 254 of the variable of the program for each step of the simulation (or program).
[0178] In step S1550, the simulation system 500 passes the acquired data (simulation log 250: position information 252 of objects in 3D space and values 254 of program variables) to the data management unit 550. The data management unit 550 commits the acquired data to the repository 570.
[0179] In step S1560, the simulation system 500 proceeds with the steps of the simulation (or program).
[0180] In step S1570, simulation system 500 determines whether or not the recording of the simulation is complete. In one aspect, simulation system 500 may determine that the recording of the simulation is complete based on the completion of recording for a specified number of cycles. In another aspect, simulation system 500 may determine that the recording of the simulation is complete based on a specified flag being set (or set). In another aspect, simulation system 500 may determine that the recording of the simulation is complete based on receiving an input from a user to stop the simulation. If simulation system 500 determines that the recording of the simulation is complete (YES in step S1570), it ends the process. Otherwise (NO in step S1570), simulation system 500 transfers control to step S1530. In one aspect, simulation system 500 may execute the process of step S1570 in step S1530.
[0181] When recording the execution results of a program in a real environment, the simulation system 500 can perform the recording process in the same manner as above, except that it uses camera images and sensor signals, etc.
[0182] FIG. 16 is a flowchart showing an example of the debugging process performed by the simulation system 500.
[0183] In step S1610, the simulation system 500 reproduces the problematic part in the simulation, for example, based on receiving an operation from the user.
[0184] In step S1620, simulation system 500 accepts a selection of variables to be traced. In a certain aspect, PLC simulation unit 520 or data management unit 550 may have a function of accepting a selection of variables to be traced.
[0185] In step S1630, simulation system 500 accepts designation of a graphing start time and an end time. In one aspect, the graphing start time and end time may be designated by the number of steps and the number of cycles of the program at the start and the number of steps and the number of cycles of the program at the end. Note that the processing of steps S1620 and S1630 may be performed before step S1610.
[0186] In step S1640, the simulation system 500 displays a graph of the variable tracing results (corresponding to the graph 1310 showing the change in the value of the variable) on the display 109. Based on the acceptance of the designation of the graphing start time and end time in step S1630, the simulation system 500 can display a graph for the designated period on the display 109.
[0187] In step S1650, simulation system 500 displays the program at the time the problem occurred on display 109. For example, based on the simulation scene of the problematic part being displayed on display 109 in step S1610, simulation system 500 can display on display 109 a program (a program with variables input) corresponding to the execution time (steps and cycles) of the simulation scene of the problematic part.
[0188] In step S1660, simulation system 500 determines whether a program modification has been accepted. If simulation system 500 determines that a program modification has been accepted (YES in step S1660), it transfers control to step S1670. Otherwise (NO in step S1660), simulation system 500 transfers control to step S1680.
[0189] In step S1670, the simulation system 500 reflects the correction in the program.
[0190] In step S1680, simulation system 500 accepts reselection of variables to be traced. For example, if the user cannot find the part to be corrected in the program displayed in step S1650, the user can search for the part to be corrected in the program from a different perspective by reselecting variables to be traced.
[0191] FIG. 17 is a flowchart showing an example of a process for comparing the results of a program simulation by the simulation system 500 with the results of the program being executed in a real environment.
[0192] In step S1710, simulation system 500 accepts the specification of a comparison start condition. The comparison start condition includes a condition for associating an execution time in the simulation with an execution time in the real environment. In one aspect, simulation system 500 may, for example, associate the timing at which a specific sensor in the real environment outputs a signal by detecting the operation of a workpiece or equipment with the execution time in the simulation (0 cycles, 1 step).
[0193] In step S1720, the simulation system 500 compares the simulation log 250 with the real environment log 1050 at the same execution time (the timing when the number of program cycles and steps is equal). In one aspect, the simulation system 500 may compare the values of variables included in each log, or may compare the position information of objects, or may compare both.
[0194] In step S1730, the simulation system 500 determines whether there is a difference between the simulation log 250 and the real environment log 1050. If the simulation system 500 determines that there is a difference between the simulation log 250 and the real environment log 1050 (YES in step S1730), the simulation system 500 transfers control to step S1740. If not (NO in step S1730), the simulation system 500 transfers control to step S1720.
[0195] In step S1740, the simulation system 500 displays the names and values of the variables with differences and simulation information. The simulation information here includes the simulation scene at the step where the differences were confirmed. In one aspect, the simulation information may also include position information 252 of the object in 3D space.
[0196] In step S1750, the simulation system 500 determines whether a request to end the comparison process has been received. For example, the simulation system 500 may receive the request to end the comparison process via the operation unit 106 or the network interface 110. If the simulation system 500 determines that a request to end the comparison process has been received (YES in step S1750), the simulation system 500 ends the process. If not (NO in step S1750), the simulation system 500 transfers control to step S1720.
[0197] As described above, the simulation system 500 according to this embodiment has a function of associating and recording the position information 252 of an object in a 3D space and the values 254 of variables of a program for each execution time. Further, the simulation system 500 has a function of playing back and reverse-playing for each step of the simulation using the recorded position information 252 of the object in the 3D space and the values 254 of the variables of the program. Furthermore, the simulation system 500 has a function of displaying the position information 252 of the object in the 3D space and the values 254 of the variables of the program at each step. With these functions, the user can easily identify a scene of the simulation where there is a problem in the operation of the device by playing back the simulation step by step. Further, the user can easily debug the program by referring to the values 254 of the variables of the program in the scene of the simulation where there is such a problem.
[0198] In addition, the simulation system 500 has a function of comparing the simulation log 250 and the log 1050 of the actual environment. With this function, the user can easily grasp problems with the program or problems with the arrangement of the device in the actual environment.
[0199] <F. Supplementary Note> As described above, this embodiment includes the following disclosure. [Configuration 1] A simulation system (500) comprising: a memory (111) for storing a program for controlling one or more devices; a processor (102) for executing a simulation of the operation of the one or more devices by the program; a display (109) for displaying a simulation screen, where the simulation screen includes a three-dimensional (3D) space display (1201) for displaying the position of each of the one or more devices in the 3D space; and an indication (1204) of the value of each of one or more variables referenced by said program; A simulation system (500) that updates the 3D spatial display (1201) and a display (1204) of the value of each of one or more variables for each step of the program. [Configuration 2] The simulation system (500) according to configuration 1, wherein the simulation screen further includes an input UI (User Interface) (1101) for receiving an operation to play back or reverse play a scene of the simulation for each step of the program. [Configuration 3] The simulation system (500) according to configuration 2, wherein the input UI (1101) is configured to be able to accept an operation to stop the simulation scene for each step of the program, or an operation to advance the simulation scene frame by frame for each step of the program. [Configuration 4] The simulation system (500) according to configuration 2, wherein the input UI (1101) is configured to be able to accept an operation to play back or play back in reverse a scene of the simulation in units of one cycle or one step of the program. [Configuration 5] 3. The simulation system (500) according to configuration 2, wherein the simulation screen is configured to be able to accept an operation to set a breakpoint in the program. [Configuration 6] 3. The simulation system (500) according to configuration 2, wherein the input UI (1101) is configured to be able to accept an operation for slow playback or slow reverse playback of the simulation scene. [Configuration 7] The above simulation screen is Further including numerical information (1203) of the location of each of the one or more devices; The simulation system (500) according to any one of configurations 1 to 6, wherein the numerical information (1203) of the position of each of the one or more devices is updated for each step of the program. [Configuration 8] the simulation screen is configured to be able to further display the program, The display of the above program (1320) is The code for the above program, and a value for each of the one or more variables; The simulation system (500) according to any one of configurations 1 to 7, wherein the simulation screen updates the values of the one or more variables included in the display (1320) of the program for each step of the program. [Configuration 9] The simulation system (500) according to configuration 8, wherein when the program steps go forward or backward, and there is a change in the value of each of the one or more variables included in the display (1320) of the program, the simulation screen highlights the changed value or the name of the variable to which the changed value has been assigned. [Configuration 10] the display (1320) of the program is configured to allow selection of each of the one or more variables; 10. The simulation system (500) according to configuration 8 or 9, wherein the simulation screen displays a graph (1310) including variables selected from the display (1320) of the program. [Configuration 11] 13. The simulation system (500) of claim 10, wherein the display (1320) of the program highlights variables included in the graph (1310). [Configuration 12] The simulation screen is configured to further display a flowchart (1420) of the program, The simulation system (500) according to any one of configurations 1 to 11, wherein the display of the flowchart (1420) highlights a block that is currently being executed among one or more blocks included in the flowchart (1420). [Configuration 13] The display of the flowchart (1420) is configured to allow selection of one or more blocks included in the flowchart (1420), 13. The simulation system according to claim 12, wherein the display of the program includes displaying a POU (Program Organization Unit) corresponding to a selected block, or highlighting the POU. [Configuration 14] A method performed by a simulation system (500), comprising: executing a simulation of the operation of one or more devices by a program for controlling the one or more devices; displaying a simulation screen; The above simulation screen is a 3D space display (1201) for displaying the position of each of the one or more devices in a 3D space; and an indication (1204) of the value of each of one or more variables referenced by said program; The method updates the 3D spatial display (1201) and a display (1204) of the value of each of the one or more variables with each step of the program. [Configuration 15] 15. A program for causing one or more processors (102) to execute the method described in claim 14.
[0200] The embodiments disclosed herein should be considered to be illustrative in all respects and not restrictive. The scope of the present disclosure is defined by the claims, not by the above description, and is intended to include all modifications within the meaning and scope equivalent to the claims. Furthermore, the disclosures described in the embodiments and each modification are intended to be implemented, as far as possible, either alone or in combination. [Explanation of symbols]
[0201] 2 Control system, 5 Remote terminal, 6,157 Sensor, 12 Power supply unit, 13 Calculation unit, 14,53 Unit, 17 Special unit, 22 Field network, 41,42 Servo motor, 51 Remote terminal bus, 52 Communication coupler, 61,237,239 Detected value, 80 Network, 81 System bus, 100 Device, 102 Processor, 104 Main memory, 106 Operation unit, 108 Output unit, 109 Display, 110 Network interface, 111 Storage, 112 Optical drive, 114 Recording medium, 116 Local communication interface, 130 Integrated development environment, 150 Equipment, 151 Conveyor, 152,155 Motor, 153,156 Motor control device, 154 Rotary knife, 158 Sheet, 159,248 Cutting position, 210 Robot hand, 211, 222 Control command, 236, 238 Encoder, 240 Main axis, 245 Slave axis, 250 Simulation log, 251, 1100, 1100A, 1100B, 1100C, 1200, 1300, 1400 Screen, 252, 602, 702, 802, 1203 Object position information, 253, 611, 1202, 1320, 1410 Program, 254, 612, 712, 812, 1204 Program variable values, 260, 265 Display, 310 Robot controller, 500 Simulation system, 510 3D shape display unit, 511 3D shape reading unit, 512 Shape drawing unit, 513 Memory display unit, 520 Simulation unit, 521 Step execution unit, 530 Program Editorial Department, 531,532 Servo motor driver, 540 Variable memory graph display unit, 550 Data management unit, 551 Data input unit, 552 Data reading unit, 553 Data difference extraction unit, 554 Data difference recording unit, 560 Simulation data comparison unit, 561 Synchronization unit, 562 Data comparison unit, 563 Display unit, 570 Repository, 571 Simulation memory, 572 Variable memory, 580 File, 601 Space, 901 IEC variable value, 902 Robot variable value, 903 IEC program step and cycle count, 1011 IEC variable value in real environment, 1012 Robot variable value in real environment, 1013 IEC program step and cycle count in real environment, 1014 Position information of object in real environment, 1050 Log of real environment, 1101 Operation UI, 1110 Blade, 1120, 1130 Cutting position, 1201 Simulation scenes,1310,1430 graphs,1420 program flowcharts.,
Claims
1. 1. A simulation system comprising: a memory for storing a program for controlling one or more devices; a processor for executing and reproducing a simulation of the operation of the one or more devices according to the program; a display for displaying a simulation screen; The processor: performing a simulation of the operation of said one or more devices; storing a log in which position information of each of the one or more objects in a three-dimensional (3D) space is associated with each value of one or more variables referenced by a program for operating the one or more devices, for each of one or more execution times during the simulation; reproducing the simulation on the simulation screen based on the log; The simulation screen is a 3D spatial display for displaying a position of each of the one or more devices within the 3D space; and an indication of the value of each of said one or more variables; A simulation system that updates the 3D spatial display and an indication of the value of each of the one or more variables with each step of the program.
2. The simulation screen is further comprising an input UI (User Interface) for receiving an operation for replaying or reverse-playing the simulation scene reproduced from the log for each step of the program; The simulation system according to claim 1 , further comprising: a display unit configured to display, based on reception of the playback operation or the reverse playback operation, values of each of the one or more variables corresponding to the updated 3D spatial display.
3. 3. The simulation system according to claim 2, wherein the input UI is configured to be capable of accepting an operation to stop the simulation scene reproduced from the log for each step of the program, or an operation to frame-by-frame advance the simulation scene reproduced from the log for each step of the program.
4. 3. The simulation system according to claim 2, wherein the input UI is configured to be able to accept an operation to play back or reverse the simulation scene reproduced from the log in units of one cycle of the program.
5. 3. The simulation system according to claim 2, wherein the simulation screen is configured to be able to accept an operation for setting a breakpoint in the program.
6. 3. The simulation system according to claim 2, wherein the input UI is configured to be able to accept an operation for slow-motion playback or slow-reverse playback of the simulation scene reproduced from the log.
7. The simulation screen is Further including numerical information of the location of each of the one or more devices; 7. The simulation system according to claim 1, wherein the numerical information of the position of each of the one or more devices is updated for each step of the program.
8. the simulation screen is configured to be able to further display the program, The program display: the code of the program; and a value for each of said one or more variables; The simulation system according to any one of claims 1 to 7, wherein the simulation screen updates the values of each of the one or more variables included in the display of the program for each step of the program based on the log, thereby reproducing the operation of the program.
9. 9. The simulation system according to claim 8, wherein when a step of the program advances or regresses, if there is a change in the value of each of the one or more variables included in the display of the program reproduced from the log, the simulation screen highlights the changed value or the name of the variable to which the changed value has been assigned.
10. the display of the program is configured to allow selection of each of the one or more variables; 10. The simulation system according to claim 8, wherein the simulation screen displays a graph including variables selected from a display of the program reproduced from the log.
11. The simulation system of claim 10 , wherein the display of the program highlights variables included in the graph.
12. the simulation screen is configured to further display a flowchart of the program reproduced from the log, The display of the flowchart is highlighting a currently executed block among one or more blocks included in the flowchart; 12. The simulation system according to claim 1, wherein the highlighted block is updated together with the 3D space display and the program every time the simulation screen is updated.
13. The display of the flowchart is configured to allow selection of one or more blocks included in the flowchart, 13. The simulation system according to claim 12, wherein the display of the program displays a POU (Program Organization Unit) corresponding to a selected block, or highlights the POU.
14. 1. A method performed by a simulation system, comprising: executing a simulation of the operation of one or more devices by a program for controlling said one or more devices; saving a log in which position information of each of the one or more objects in 3D space is associated with each value of one or more variables referenced by a program for operating the one or more devices, for each of one or more execution times during the simulation; and reproducing the simulation on a simulation screen based on the log; The simulation screen is a 3D spatial display for displaying a position of each of the one or more devices within the 3D space; and an indication of the value of each of said one or more variables; and updating the 3D spatial display and the representation of the value of each of the one or more variables with each step of the program.
15. A program for causing one or more processors to perform the method of claim 14.
Citation Information
Patent Citations
Robot system
JP1995214485A
Robot device
JP1995328968A
Algorithm education supporting system
JP1996110754A
Simulation execution device and execution method of simulation
JP2000035902A
Method for supporting software program generation
JP2000242479A