Patent Description:
Computer-assisted simulations have been applied to various technical fields. Such simulations may be a great help for preliminary discussions and considerations of devices and apparatuses even before they are ready to be used.

<CIT> describes an apparatus usable for the simulations. This apparatus is provided with a first behavior calculator and a second behavior calculator. The first behavior calculator calculates the behavior of a first target disposed in a virtual space that corresponds to a first device mounted with an accessory device. The second behavior calculator calculates the behavior of a second target disposed in a virtual space that corresponds to a second device mounted with an accessory device. It is further described in this literature that, for each one of predetermined time steps, the first behavior calculator calculates the behavior of the first target corresponding to the first device mounted with the accessory device in the relevant time step, and the second behavior calculator calculates the behavior of the accessory device mounted on the first device on the basis of the calculated behavior of the first target (refer to the "Abstract").

<CIT> relates to a method in an industrial process control system, which comprises creating a control strategy for an industrial process, running a simulation of the control strategy, and rewinding the simulation of the control strategy.

<CIT> relates to an information processing device which simulates a control program and displays the result of the simulation on a monitor.

The technique described in <CIT>, may demand that the simulations be repeatedly reproduced in order to verify the programs to operate the devices. This apparatus, therefore, may often require a great deal of time for the program verification. Thus, a simulation technique that allows the program verification to be more efficiently performed is required.

The present disclosure has been made in view of the above background, and an object in an aspect is to provide a simulation technique that allows the program verification to be more efficiently performed.

In an embodiment of this disclosure, a simulation system is provided according to claim <NUM>.

As disclosed herein, the simulation system may present the positional information of the one or more objects and the value of the one or more variables for each of the one or more execution times. This may allow a user to check both of the object position and variable value referred to by the program for each of the execution times of the simulation. In case, for example, the position or the operation of the object at an execution time A is not intended, the user can immediately check the variable value at the execution time A (can easily find a problem of the program) and thereby can debug the program efficiently.

In the simulation system disclosed herein, the simulator is configured to reproduce the simulation while stopping the simulation for each of the one or more execution times based on the first log. The displayer is configured to display a screen of the simulation for each of the one or more execution times and the first log for each of the execution times.

As disclosed herein, the simulation system may reproduce the simulation while stopping the simulation for each of the execution times.

In the simulation system disclosed herein, the simulator is configured to reversely reproduce the simulation while stopping the simulation for each of the one or more execution times based on the first log. The displayer is configured to display a screen of the simulation for each of the one or more execution times and the first log for each of the execution times.

As disclosed herein, the simulation system may reversely reproduce the simulation while stopping the simulation for each of the execution times. For example, a user can more closely follow the operation of the program by slightly rewinding the problematic simulation scene.

The simulation system disclosed herein further includes a data differential extractor configured to extract a differential between the first log and data previously recorded. The data recorder is configured to store the differential.

As disclosed herein, the simulation system can save the memory capacity of the log by storing only the differential.

In the simulation system disclosed herein, the data input unit further includes a feature that obtains one or more time stamps in a real environment, positional information of one or more objects in the real environment, and a value of one or more variables referred to by the program to operate the one or more devices in the real environment. The data recorder further includes a feature that stores, as a second log, the positional information of the one or more objects in the real environment and the value of the one or more variables referred to by the program to operate the one or more devices in the real environment for each of the one or more time stamps in the real environment in a manner that the positional information and the value are associated with each other.

As disclosed herein, the simulation system can obtain the log in the real environment as well as the log in the simulation.

The simulation system disclosed herein further includes a synchronizer configured to allow an execution time of the first log and an execution time of the second log to correspond to each other. The displayer is configured to display the first log and the second log at a same execution time.

As disclosed herein, the simulation system may synchronize and display the execution time of the first log in the simulation and the execution time of the second log in the real environment in a manner that the first and second logs are comparable to each other.

In the simulation system disclosed herein, the displayer is configured to display a graph of the value of the one or more variables for each of the one or more execution times included in the first log.

As disclosed herein, the simulation system can intuitively display any change in the value of the one or more variables using the graph.

In the simulation system disclosed herein, the displayer is configured to display an operation of the program while reproducing the operation based on the value of the one or more variables for each of the one or more execution times included in the first log.

The simulation system disclosed herein may present, to a user, the program status for each of the one or more execution times based on the value of the one or more variables.

In the simulation system disclosed herein, the displayer is configured to display a screen of the simulation for each of the one or more execution times in the simulation and a flowchart of the program for each of the one or more execution times in the simulation. The displayer is configured to highlight and display a process on the flowchart currently executed for each of the one or more execution times in the simulation.

As disclosed herein, the simulation system may simultaneously present, to a user, the simulation screen and the currently executed process on the flowchart.

In the simulation system disclosed herein, the simulator further includes a feature that receives an input for selection of a variable having a value to be traced for each of the one or more execution times from the one or more variables included in the program.

As disclosed herein, the simulation system allows a user to select a variable that needs to be traced.

In the simulation system disclosed herein, the simulator further includes a feature that receives an input for setting a reproduction starting time and a reproduction ending time of the simulation.

As disclosed herein, the simulation system can receive the input for setting the reproduction starting time and the reproduction ending time of the simulation.

In the simulation system disclosed herein, the data recorder is configured to record a cycle and step count when the program is executed as an execution time in the simulation.

As disclosed herein, the simulation system can record the cycle and step count when the program is executed as the execution time in the simulation.

In another embodiment of this disclosure, a method executable by a simulation system is provided according to claim <NUM>.

According to the method disclosed herein, the positional information of the one or more objects and the value of the one or more variables may be both presented for each of the one or more execution times. This may allow a user to check both of the object position and variable value referred to by the program for each of the execution times of the simulation.

In yet another embodiment of this disclosure, a program causing one or more processors to execute the above method is provided, the program being as specified in claim <NUM>.

According to the program disclosed herein, the positional information of the one or more objects and the value of the one or more variables may be both presented for each of the one or more execution times. This may allow a user to check both of the object position and variable value referred to by the program for each of the execution times of the simulation.

Embodiments of the technical idea according to the present disclosure are hereinafter described with reference to the accompanying drawings. In the description below, like components are illustrated with the same reference signs. Also, they are referred to likewise and have similar functional features. Such components, therefore, will not be repeatedly described in detail.

An exemplified scene to which the present invention is applied is described referring to <FIG> and <FIG>.

<FIG> is a diagram illustrating an example of a device whose operation can be simulated by a simulation system according to an embodiment. A simulation system <NUM> according to this embodiment (see <FIG>) simulates the operation of an optional device used in factory automation (FA) in plants and the like. Simulation system <NUM> may simulate the operation of robot arms, belt conveyers, rotary knives, sensors and any other optional device(s), and the operations of combinations of these.

A device <NUM> illustrated in <FIG> is a multifunction device including a conveyer <NUM> and a rotary knife <NUM>. Device <NUM> has a cutting feature that allows a sheet <NUM> carried on conveyer <NUM> to be cut in a predetermined length. Device <NUM> includes the following components; conveyer <NUM>, a motor <NUM>, a motor controller <NUM>, rotary knife <NUM>, a motor <NUM>, a motor controller <NUM>, and a sensor <NUM>.

Conveyer <NUM> transports sheet <NUM>. Motor <NUM> is connected to a main shaft serving to rotate the conveyer and drives conveyer <NUM>. Motor controller <NUM> controls the speed or torque of motor <NUM>.

Rotary knife <NUM> includes a rotatable roller and a knife attached onto this roller. As a result of the roller being rotated, the knife cuts sheet <NUM> carried on conveyer <NUM>. Motor <NUM> is connected to the roller of rotary knife <NUM> and drives rotary knife <NUM>. Motor controller <NUM> controls the speed or torque of motor <NUM>.

Sensor <NUM> detects a cutting position <NUM> on sheet <NUM>. Rotary knife <NUM> cuts the sheet at cutting position <NUM> detected by sensor <NUM>.

Motor controllers <NUM> and <NUM> and sensor <NUM> may be connected to a programmable logic controller (PLC) <NUM> (see <FIG>). In this case, PLC <NUM> may read a signal from sensor <NUM> and control rotary knife <NUM> based on the read signal. PLC <NUM> controls device <NUM> on the basis of a program installed therein.

Simulation system <NUM> reproduces, in an ongoing simulation, the operation of program-installed PLC <NUM> and the operation of device <NUM> controlled by PLC <NUM>. Thus, a user may debug the program of the PLC by checking the operation of device <NUM> in the simulation. In an aspect, the program that can be simulated by simulation system <NUM> may be an IEC program. The IEC program is a program that conforms to the IEC <NUM>-<NUM> standards. This program includes a ladder program, structured text (ST), and the like.

<FIG> is a diagram illustrating an example of simulation being executed by simulation system <NUM>. Referring to <FIG>, functional features of simulation system <NUM> are hereinafter described. Simulation system <NUM> includes a simulation recording feature and a program debugging feature using a recorded simulation result. The description is given below to the features of simulation system <NUM> using device <NUM> as an example.

First, the simulation recording feature is described. As described, simulation system <NUM> reproduces the operation of program-installed PLC <NUM> and the operation of device <NUM> controlled by PLC <NUM>, in a simulation using a three-dimensional (3D) space.

At the time, simulation system <NUM> records a simulation log <NUM>. Simulation log <NUM> contains positional information <NUM> of an object in the 3D space for each execution time (or execution timing) of the program, and also contains a variable value <NUM> of the program for each execution time. The object described herein in the 3D space may include, for example, a device in the 3D space, a component(s) constituting the device, a work, any other optional object(s), and a combination(s) of these items.

In an aspect, the execution time (or execution timing) may be defined by the number of command steps of the program and the number of times when the program is repeatedly executed (cycles). The step may refer to one command of the program or commands in one row of the program entered in the editor (one command of the ladder program, commands in one row of ST entered in the editor, or the like). When one command or commands in one row of the program (one command of the ladder program, commands in one row of ST entered in the editor, or the like) has been executed, the program may be regarded as having proceeded by one step. Intervals between the steps may be determined by the command cycles of PLC <NUM>. An example is given below, in which the program contains commands for <NUM> steps. In this case, the program has been executed once (one cycle) at a point of time when execution of the commands for <NUM> steps is completed, and the program has been repeatedly executed <NUM> times (cycles) at a point of time when execution of the commands for <NUM> steps is completed. In another aspect, the execution time (or execution timing) may be defined by an optional time interval (one second, <NUM> milliseconds, or the like) determined beforehand.

In the example illustrated in <FIG>, simulation system <NUM> records positional information <NUM> of the object in the 3D space and variable value <NUM> of the program at a certain execution time (<NUM> cycles, <NUM> steps) as simulation log <NUM> in a manner that they are associated with each other.

Positional information <NUM> of the object in the 3D space contains the positional information of each of one or more objects present in the 3D space. In the example illustrated in <FIG>, positional information <NUM> of the object in the 3D space may contain the angle of a main shaft <NUM> (shaft of the conveyer connected to motor <NUM>), the angle of a driven shaft <NUM> (roller of rotary knife <NUM>), a cutting position <NUM> (blade position), and positions of the other objects.

Variable value <NUM> of the program includes values of one or more variables referred to by a program <NUM> installed in PLC <NUM>. In the example illustrated in <FIG>, variable value <NUM> of the program includes values of GEAROMPOS1_START SYNC, GEAROMPOS1_INSYNC, MC_Axis000. Pos, MC_Axis001. Pos, and values of other variables.

Next, the debugging feature is described. On the basis of simulation log <NUM>, simulation system <NUM> may reproduce the simulation and then display a simulation scene on a screen <NUM> for each step.

Screen <NUM> includes a display <NUM> of the 3D space, a display <NUM> of the program, positional information <NUM> of the object in the 3D space per execution time, and variable value <NUM> of the program per execution time.

Simulation system <NUM> includes a feature that reproduces or reversely reproduces the simulation while pausing the simulation for each step on the basis of an operation input from a user.

For example, a simulation scene is assumed represent a first execution time. In this case, screen <NUM> presents display <NUM> of the 3D space, display <NUM> of the program, positional information <NUM> of the object in the 3D space, and variable value <NUM> of the program at the first execution time.

For example, the simulation scene is assumed to have proceeded (or returned) by one step from the first execution time to a second execution time based on an operation input from a user. In this case, screen <NUM> presents display <NUM> of the 3D space, display <NUM> of the program, positional information <NUM> of the object in the 3D space, and variable value <NUM> of the program at the second execution time. In an aspect, display <NUM> of the program may include a state of execution of the program to which variable value <NUM> of the program has been assigned.

By referring to screen <NUM>, a user can check display <NUM> of the 3D space, display <NUM> of the program, positional information <NUM> of the object in the 3D space, and variable value <NUM> of the program at the same time. Therefore, the user may easily debug the program while checking the operation of device <NUM>.

Next, referring to <FIG>, the whole structural features of a system to be simulated by simulation system <NUM>, hardware configurations of a device that operates as simulation system <NUM>, and functional configurations of simulation system <NUM> are hereinafter described.

<FIG> is a diagram illustrating an example of a unit configuration of a control system <NUM> including devices to which a simulation technique according to this embodiment is applicable. Device <NUM> illustrated in <FIG> may be actualized as part of control system <NUM>.

Control system <NUM> includes, for example, PLC <NUM>, an IO remote terminal <NUM> and servo motor drivers <NUM> and <NUM> that are connected to PLC <NUM> through a field network <NUM>, a robot controller <NUM>, and IO devices disposed in the field (a sensor <NUM>, encoders <NUM>, <NUM>, and the like).

PLC <NUM> includes a computing unit <NUM> that executes main computing processes, one or more IO units <NUM>, and a special unit <NUM>. These units are configured to transmit and receive data to and from one another through a system bus <NUM> and receive power supply from a power supply unit <NUM>. A device <NUM> for simulation use is connectable to computing unit <NUM>.

Device <NUM> may operate as simulation system <NUM>. Device <NUM> may install, in computing unit <NUM>, a program whose operation has been verified by the simulation. Computing unit <NUM> may control each device in control system <NUM> on the basis of the installed program. Device <NUM> may be connected to computing unit <NUM> through a network <NUM>.

IO unit <NUM> collects detected values <NUM>, <NUM> and <NUM> from the IO devices including sensor <NUM> and encoders <NUM> and <NUM>. For example, sensor <NUM> may be sensor <NUM> that detects cutting position <NUM> of sheet <NUM> illustrated in <FIG>. Encoders <NUM> and <NUM> may be attached to motor <NUM> that drives conveyer <NUM> or motor <NUM> that drives rotary knife <NUM>. The detected values from the IO devices is set (written in) to corresponding bits of a memory of IO unit <NUM>.

Computing unit <NUM> executes computations of the control program using values collected by IO unit <NUM> and sets (writes in) values of an obtained result to corresponding bits in IO unit <NUM>. A peripheral device(s) or the IO devices are operated with reference to the bit values in IO unit <NUM>. Thus, PLC <NUM> can control robot, conveyer, or the like, which are to be controlled, by transmitting and receiving data to and from the IO devices and the peripheral device(s) through IO unit <NUM>.

Special unit <NUM> has features unsupported by IO unit <NUM>, including input and output of analog data, temperature control, communication through a particular communication system.

For example, robot controller <NUM>, servo motor drivers <NUM> and <NUM>, IO remote terminal <NUM>, and the like may be connected to field network <NUM>.

As with IO unit <NUM>, IO remote terminal <NUM> basically carries out typical processes associated with inputs and outputs. Specifically, IO remote terminal <NUM> includes one or more IO units <NUM> and a communication coupler <NUM> used to carry out processes associated with data transmission in field network <NUM>. These units are configured to transmit and receive data to and from one another through an IO remote terminal bus <NUM>.

Servo motor drivers <NUM> and <NUM> are connected to computing unit <NUM> through field network <NUM> and drive servo motors <NUM> and <NUM> in accordance with command values received from computing unit <NUM>. Specifically, servo motor drivers <NUM> and <NUM> receive, from PLC <NUM>, command values including a position command value, a speed command value and a torque command value, at constant time intervals, for example, control periods. Computing unit <NUM> may generate these command values based on detected values <NUM> and <NUM> from encoders <NUM> and <NUM>. In an aspect, servo motors <NUM> and <NUM> may be used as motor <NUM> that drives rotary knife <NUM>.

Computing unit <NUM> refers to the detected values from the IO devices described earlier and runs a predetermined control program. Thus, computing unit <NUM> may allow a robot hand <NUM> to perform handling of a work, for example, picking up, placing and pressing down the work.

Specifically, computing unit <NUM> generates a control command <NUM> for the robot arm and a control command <NUM> for robot hand <NUM> and outputs these control command signals to robot hand <NUM> through robot controller <NUM>. Computing unit <NUM>, at the time of generating control command <NUM>, may refer to a value indicative of the status of robot hand <NUM> in addition to detected values <NUM> of the IO devices described earlier. The robot arm may include an optional number of servo motors, for example, servo motors <NUM> to <NUM>.

The whole control system <NUM> may be targeted for simulation by simulation system <NUM>. Otherwise, only a part of configurations included in control system <NUM> may be targeted for simulation by simulation system <NUM>.

<FIG> is a diagram illustrating an example of a hardware configuration of device <NUM>. Device <NUM> may operate as simulation system <NUM>. In an aspect, simulation system <NUM> may be a system including a plurality of devices <NUM> or including at least a part of hardware configurations of device <NUM>. Otherwise, simulation system <NUM> may be a virtual machine on a cloud platform including at least a part of hardware configurations of device <NUM>.

Device <NUM> includes, as its principal components, an operating system (OS), a processor <NUM> that executes a program on the OS, a main memory <NUM> that provides a working area in which data required for processor <NUM> to run the program is stored, an operation unit <NUM> (operation input unit) through which a keyboard and/or a mouse are manipulated by a user, a display <NUM>, indicators, an output unit <NUM> that outputs a processing result like a printing result, a network interface <NUM> connected to different networks including network <NUM>, an optical drive <NUM>, a local communication interface <NUM> that communicates with an external device(s), and a storage <NUM>. These components are interconnected through an internal bus <NUM> in a manner that they are allowed to communicate data to and from one another.

Device <NUM> includes optical drive <NUM>. Programs may be read through this optical drive from a computer-readable recording medium <NUM> and then installed into storage <NUM>. Examples of computer-readable recording medium <NUM> may include optical recording media in which computer-readable programs are non-transitorily stored (for example, a digital versatile disc (DVD) or the like).

The programs to be executed by device <NUM> may be installed into device <NUM> through computer-readable recording medium <NUM> or may be installed into device <NUM> through network interface <NUM> from a server device or the like (not illustrated) on a network.

Storage <NUM> includes for example, a hard disk drive (HDD) or a flash solid state drive (SSD), and stores a program(s) executed by processor <NUM>. Specifically, storage <NUM> stores an OS <NUM> and an integrated developing environment <NUM>. Integrated developing environment <NUM> may be actualized in the form of an application that operates on OS <NUM>.

Integrated developing environment <NUM> provides the functional features of simulation system <NUM> described referring to <FIG>. In other words, the features of simulation system <NUM> can be actualized by processor <NUM> executing integrated developing environment <NUM> loaded in main memory <NUM>.

In an aspect, the simulation recording feature and debugging feature described referring to <FIG> may be actualized as add-in features of integrated developing environment <NUM>.

In an aspect, device <NUM> may actualize the features of integrated developing environment <NUM>, in whole or in part, using an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or the like.

<FIG> is a diagram illustrating an example of functional configurations of simulation system <NUM>. The functional configurations illustrated in <FIG> may be actualized as program components. In this case, the functional configurations may be allowed to operate, as software, on hardware of device <NUM>.

Simulation system <NUM> may include, as its functional configurations, a 3D shape displayer <NUM>, a PLC simulator <NUM>, an IEC program editor <NUM>, a variable memory graph displayer <NUM>, a data manager <NUM>, a real device-simulation data comparator <NUM>, and a repository <NUM>.

3D shape displayer <NUM> renders the simulation in the 3D space on a display. To this end, 3D shape displayer <NUM> includes a 3D shape reader <NUM>, a 3D shape renderer <NUM>, and a 3D memory displayer <NUM>.

3D shape reader <NUM> reads a CAD file <NUM> used in the simulation and converts the read CAD file <NUM> into a form that can be rendered by 3D shape renderer <NUM>. In an aspect, 3D shape reader <NUM> may read CAD file <NUM> from storage <NUM>. In another aspect, 3D shape reader <NUM> may read CAD file <NUM> input from outside through network interface <NUM>, optical drive <NUM>, or local communication interface <NUM>.

3D shape renderer <NUM> displays the object in the 3D space (data obtained from 3D shape reader <NUM>) and the motion of the object on display <NUM>. The object in the 3D space may include a work or the like in addition to the devices included in control system <NUM>. For example, 3D shape renderer <NUM> exhibits display <NUM> of the 3D space on display <NUM>.

3D memory displayer <NUM> displays, on display <NUM>, positional information <NUM> of the object in the 3D space per execution time. Further, 3D memory displayer <NUM> reads simulation log <NUM> from repository <NUM> and reproduces the simulation recorded in the past. In an aspect, 3D memory displayer <NUM> may use the rendering feature of 3D shape renderer <NUM> at the time of reproducing the simulation recorded in the past. In an aspect, 3D memory displayer <NUM> may render all of the screens illustrated in <FIG> and <FIG>.

PLC simulator <NUM> executes the program installed in PLC <NUM> in the ongoing simulation. To this end, PLC simulator <NUM> includes a step executor <NUM>. In an aspect, PLC simulator <NUM> may include a display feature used at the time of reproduction of the simulation. In this case, PLC simulator <NUM> may render all of the screens illustrated in <FIG> and <FIG>.

Step executor <NUM> executes the program for each step. Step executor <NUM> may reproduce or reversely reproduce, for each step, simulation log <NUM> recorded in repository <NUM>. Further, step executor <NUM> display, on display <NUM>, variable value <NUM> of the program per execution time. 3D shape displayer <NUM> may update the display of the object in the 3D space based on the number of times when the program is executed (number of cycles) and a position at which the program is executed (step position) obtained from step executor <NUM>.

IEC program editor <NUM> receives an operation input for editing of the program through operation unit <NUM>. In an aspect, step executor <NUM> may carry out the simulation by immediately reflecting any program change by IEC program editor <NUM>.

Variable memory graph displayer <NUM> may display a graph <NUM> and the like indicative of changes of the variable value (see <FIG>) on display <NUM> based on variable memory <NUM> recorded in repository <NUM>.

Data manager <NUM> manages simulation log <NUM>. To this end, data manager <NUM> includes a data input unit <NUM>, a data reader <NUM>, a data differential extractor <NUM>, and a data differential recorder <NUM>. In an aspect, data manager <NUM> may acquire recording settings of the simulation through operation unit <NUM>. The recording settings of the simulation include, for example, designating the object(s) to be recorded, designating the variable(s) to be recorded, and designating the duration of the simulation being executed. Data manager <NUM> may record simulation log <NUM> based on the obtained settings. In an aspect, the duration of the simulation being executed may be set based on the starting time and ending time of the simulation. In another aspect, the duration of the simulation being executed may be set based on the numbers of steps and of cycles of the program when the program starts and the numbers of steps and of cycles of the program when the program ends.

Data input unit <NUM> acquires, from 3D shape displayer <NUM>, positional information <NUM> of the object in the 3D space per execution time. Data reader <NUM> acquires, from PLC simulator <NUM>, variable value <NUM> of the program per execution time.

Data reader <NUM> transmits data stored in a 3D simulation memory <NUM> to 3D shape displayer <NUM> at the time of debugging (when the recorded simulation is reproduced). Similarly, data reader <NUM> transmits data stored in variable memory <NUM> to PLC simulator <NUM> at the time of debugging.

Data differential extractor <NUM> extracts a differential per execution time of data acquired by data input unit <NUM> (positional information <NUM> of the object in the 3D space and variable value <NUM> of the program). Specifically, data differential extractor <NUM> compares positional information <NUM> of the object in the 3D space at the first execution time against positional information <NUM> of the object in the 3D space at the second execution time to extract a differential between these pieces of positional information of the object. Similarly, data differential extractor <NUM> compares variable value <NUM> of the program at the first execution time against variable value <NUM> of the program at the second execution time to extract a differential between these variable values.

Data differential recorder <NUM> stores, as part of simulation log <NUM>, the extracted differential between the positions of the object in 3D simulation memory <NUM>. Data differential recorder <NUM> stores, as part of simulation log <NUM>, the extracted differential between the variable values in variable memory <NUM>.

If pieces of positional information <NUM> of the object in all of the 3D spaces and all of the program variable values <NUM> are stored in repository <NUM> for each step, simulation log <NUM> may certainly contain an enormous volume of data. Therefore, data differential extractor <NUM> and data differential recorder <NUM> store only a differential to the previous record in repository <NUM> and thereby save the memory capacity of repository <NUM>.

Real device-simulation data comparator <NUM> compares the results of program execution in the simulation and in a real environment. To this end, real device-simulation data comparator <NUM> includes a synchronizer <NUM>, a data comparator <NUM>, and a displayer <NUM>.

In an aspect, based on a signal or the like obtained from a camera-captured image or a sensor, PLC simulator <NUM> may output, to data manager <NUM>, a time stamp, positional information of the object per execution time, and variable value of the program in the real environment in a manner that these pieces of information are associated with one another. Real device-simulation data comparator <NUM> reproduces simulation log <NUM> stored in repository <NUM> and a log in the real environment (not illustrated) and may thereby compare the results of program execution in the simulation and in the real environment.

Synchronizer <NUM> makes cycles in the simulation and in the real environment coincide with each other. Specifically, synchronizer <NUM> associates the execution time in the simulation (cycles and steps) with the execution time in the real environment (times stamp or steps and cycles of the program in the real environment).

Data comparator <NUM> compares the results of program execution in the simulation and in the real environment at the same execution time.

Displayer <NUM> may display the results of program execution in the simulation and in the real environment at the same execution time. In an aspect, displayer <NUM> may display, on display <NUM>, a differential between the results of program execution in the simulation and in the real environment. In another aspect, displayer <NUM> may highlight and display a differential between the results of program execution in the simulation and in the real environment. This may help a user to easily correct the program in accordance with the real environment.

Repository <NUM> records simulation log <NUM>. Repository <NUM> includes 3D simulation memory <NUM> and variable memory <NUM>. In an aspect, repository <NUM> may be a repository of a version management system.

3D simulation memory <NUM> stores, for each step, positional information <NUM> of the object in the 3D space associated with the execution time.

Variable memory <NUM> stores, for each step, variable value <NUM> of the program associated with the execution time.

Repository <NUM> may record an execution log of the program in the real environment. In this case, repository <NUM> stores, for each step, the positional information of the object in the real environment associated with the execution time in the real environment. Likewise, repository <NUM> stores, for each step, the variable value of the program in the real environment associated with the execution time in the real environment.

Next, referring to <FIG>, steps of recording simulation log <NUM> by simulation system <NUM> are described. In the examples illustrated in <FIG>, simulation system <NUM> records simulation log <NUM> of device <NUM>.

<FIG> is a diagram illustrating a first example of ongoing simulation. In the example illustrated in <FIG>, simulation system <NUM> is executing a program <NUM> in the simulation. The motion and the position of each object are reproduced in a 3D space <NUM>.

3D space <NUM> includes the objects in the 3D space at an execution time (<NUM> cycles, <NUM> steps). The execution time (<NUM> cycles, <NUM> steps) may be rephrased as a point in time when PLC <NUM> completed the execution of program <NUM><NUM> times and PLC <NUM> completed the execution of <NUM> steps of program <NUM>.

Simulation system <NUM> stores, in repository <NUM>, the positional information of the object in 3D space <NUM> and the variable value of the program at each execution time as simulation log <NUM> every time when PLC <NUM> executes program <NUM> for one step in the simulation. Specifically, simulation system <NUM> stores, in repository <NUM>, differential information indicative of any differential to the previous record.

In the example illustrated in <FIG>, simulation system <NUM> stores, in repository <NUM>, positional information <NUM> of the object in the 3D space and a variable value <NUM> of the program at an execution time (<NUM> cycles, <NUM> steps) as simulation log <NUM>.

<FIG> is a diagram illustrating a second example of ongoing simulation. The example illustrated in <FIG> indicates that the execution of program <NUM> has proceeded by one step from the example illustrated in <FIG>. 3D space <NUM> includes the objects in the 3D space at an execution time (<NUM> cycles, <NUM> steps).

Since PLC <NUM> has executed program <NUM> by one step in the simulation, simulation system <NUM> stores, in repository <NUM>, positional information <NUM> of the object in the 3D space and a variable value <NUM> of the program at the execution time (<NUM> cycles, <NUM> steps) as simulation log <NUM>.

At the time, "GEAROMPOS1_INSYNC" is the only difference between positional information <NUM> of the object in the 3D space and variable value <NUM> of the program at the execution time (<NUM> cycles, <NUM> steps) and positional information <NUM> of the object in the 3D space and variable value <NUM> of the program at the execution time (<NUM> cycles, <NUM> steps). In this case, simulation system <NUM> stores the differential value, "GEAROMPOS1_INSYNC" in repository <NUM> as simulation log <NUM>. Thus, simulation system <NUM> may save the memory capacity of repository <NUM> by storing, in this repository, the differential to previously recorded simulation log <NUM>.

<FIG> is a diagram illustrating a third example of ongoing simulation. The example illustrated in <FIG> indicates that the execution of program <NUM> has proceeded by <NUM> cycles from the example illustrated in <FIG>. 3D space <NUM> includes the objects in the 3D space at an execution time (<NUM> cycles, <NUM> steps).

Simulation system <NUM> continues to store simulation log <NUM> in repository <NUM> every time when PLC <NUM> executes program <NUM> for one step in the simulation. At the time, simulation system <NUM> stores, in repository <NUM>, only the differential to previously recorded simulation log <NUM>.

At a point in time illustrated in <FIG>, positional information <NUM> of the object in the 3D space and a variable value <NUM> of the program at an execution time further ahead by <NUM> cycles (<NUM> cycles, <NUM> steps) from a point in time illustrated in <FIG> are stored in repository <NUM> as simulation log <NUM>.

<FIG> is a diagram illustrating a first example of data stored in repository <NUM>. In the example illustrated in <FIG>, simulation log <NUM> is stored in repository <NUM>. Simulation log <NUM> includes an IEC variable value <NUM>, a robot variable value <NUM>, a step and cycle count <NUM> of the IEC program, and positional information <NUM> of the object in the 3D space.

IEC variable value <NUM> and robot variable value <NUM> are included in variable value <NUM> of the program. IEC variable value <NUM> includes one or more variable values referred to by the program executed by PLC <NUM>. Robot variable value <NUM> includes a variable(s) and the like for control of robot hand <NUM>.

Step and cycle count <NUM> of the IEC program includes the number of times when the program is repeatedly executed (cycles) and a step previously executed. Step and cycle count <NUM> of the IEC program is associated with positional information <NUM> of the object in the 3D space and variable value <NUM> of the program as the simulation execution time (or execution timing).

IEC variable value <NUM>, robot variable value <NUM>, step and cycle count <NUM> of the IEC program, and positional information <NUM> of the object are stored in repository <NUM> for each step as differential information relative to simulation log <NUM>.

In an aspect, it is unnecessary for simulation system <NUM> to store current simulation log <NUM> in repository <NUM> in the case of no differential between current simulation log <NUM> and simulation log <NUM> previously stored in repository <NUM>. In another aspect, in the case of no differential between current simulation log <NUM> and simulation log <NUM> previously stored in repository <NUM>, simulation system <NUM> may store step and cycle count <NUM> of the IEC program in repository <NUM> instead of storing in repository <NUM>, IEC variable value <NUM>, robot variable value <NUM>, and positional information <NUM> of the object in the 3D space.

<FIG> is a diagram illustrating a second example of data stored in repository <NUM>. In the example illustrated in <FIG>, simulation log <NUM> of the program and a log <NUM> of the program in the real environment are stored in repository <NUM>.

Log <NUM> in the real environment includes an IEC variable value <NUM> in the real environment, a robot variable value <NUM> in the real environment, a step and cycle count <NUM> of the IEC program in the real environment, and positional information <NUM> of the object in the real environment.

IEC variable value <NUM> in the real environment includes one or more variable values referred to by the program executed by PLC <NUM> in the real environment.

Robot variable value <NUM> in the real environment includes a variable and the like for control of robot hand <NUM> when the program is executed in the real environment.

Step and cycle count <NUM> of the IEC program in the real environment indicates an execution time when the program is executed in the real environment. In an aspect, step and cycle count <NUM> of the IEC program in the real environment may include a time stamp calculated from, an execution cycle or the like of the program by PLC <NUM>. In another aspect, simulation system <NUM> may determine that a point in time when the operation of the device or work is detected by any sensor is the first step of the program in the real environment. Simulation system <NUM> can synchronize the execution timing of the program in the simulation with the execution timing of the program in the real environment by associating the first step of the program in the real environment with the first step of the program in the simulation.

Positional information <NUM> of the object in the real environment indicates the position of the object when the program is executed in the real environment. In an aspect, positional information <NUM> of the object in the real environment may be detected with use of a camera (or a 3D camera), a sensor, and the like. Simulation log <NUM> and log <NUM> in the real environment are referred to by real device-simulation data comparator <NUM>. Real device-simulation data comparator <NUM> may compare the execution results of the program in the simulation and in the real environment by referring to simulation log <NUM> and log <NUM> in the real environment.

In an aspect, simulation system <NUM> may generate a plurality of branches using a version management system and store simulation log <NUM> and log <NUM> in the real environment in each of the branches.

Next, referring to <FIG>, steps of debugging the program using simulation system <NUM> are described. In the examples illustrated in <FIG>, simulation system <NUM> reproduces, for each step, simulation log <NUM> of device <NUM> recorded in the past.

<FIG> is a diagram illustrating a first example of a debug screen in simulation system <NUM>. A screen <NUM> includes a simulation scene reproduced based on simulation log <NUM> of device <NUM> recorded in the past. Screen <NUM> is displayed on display <NUM>. Screen <NUM> may include an operational UI <NUM> used to input optional operations, for example, reproduction, reverse reproduction and pausing of the simulation scene for each step, and stoppage of the simulation. This may allow a user to update the simulation scene for each step by manipulating operational UI <NUM>.

Sheet <NUM> uncut at a cutting position <NUM> is displayed on screen <NUM>. In this case, a user may look into what is causing any trouble of the program by reproducing the simulation scene after tracking the simulation scene back to a point little earlier using operational UI <NUM> (for example, around a point in time when sheet <NUM> is cut at a cutting position <NUM> previous to cutting position <NUM>).

For example, a screen 1100A displays a scene before sheet <NUM> is cut at cutting position <NUM>. A screen 1100B displays a scene when sheet <NUM> is cut at cutting position <NUM>. A screen 1100C displays a scene after sheet <NUM> is cut at cutting position <NUM>. It is known from screens 1100A to 1100C that a blade <NUM> fails to reach cutting position <NUM> of sheet <NUM> after sheet <NUM> is cut at cutting position <NUM>. In other words, it is known that the rotating speed of driven shaft <NUM> is behind the speed at which sheet <NUM> is carried forward. In an aspect, simulation system <NUM> may display successive simulation scenes, like screens 1100A to 1100C at the same time on display <NUM>.

Thus, a user may easily grasp a problem or the like in the layout and operations of the devices by reproducing or reversely reproducing the simulation screen for each step and correct the program based on the grasped problem.

<FIG> is a diagram illustrating a second example of the debug screen in simulation system <NUM>. A screen <NUM> includes a simulation scene <NUM> reproduced based on simulation log <NUM> of device <NUM> recorded in the past (display of the 3D space), a program <NUM>, positional information <NUM> of the object, and a variable value <NUM> of the program. In an aspect, simulation system <NUM> (or PLC simulator <NUM>) may receive an operation input for selection of a variable to be traced. Based on the received operation input for selection of the variable to be traced, simulation system <NUM> (or PLC simulator <NUM>) may include only the value of variable to be traced into variable value <NUM> of the program.

A user may update simulation scene <NUM> for each step by manipulating operational UI <NUM> to reproduce or reversely reproduce the simulation screen. Every time when simulation scene <NUM> is updated for each step, program <NUM>, positional information <NUM> of the object, and variable value <NUM> of the program are updated likewise.

For example, when a user finds a problem in simulation scene <NUM>, the user may check simulation scene <NUM> for a few steps before and after the problematic scene by manipulating operational UI <NUM>. The user may further easily grasp a problem of the program by checking program <NUM>, positional information <NUM> of the object, and variable value <NUM> of the program for a few steps before and after the problematic scene at the same time.

<FIG> is a diagram illustrating a third example of the debug screen in simulation system <NUM>. A screen <NUM> includes variable graph <NUM> generated based on variable value <NUM> of the program recorded in the past and program <NUM> whose status is reproduced based on variable value <NUM> of the program recorded in the past.

Simulation system <NUM> may update each variable value displayed on program <NUM> for each step. In an aspect, simulation system <NUM> may update variable graph <NUM> and program <NUM> based on the operation input from a user for step reproduction or reverse reproduction. For example, simulation system <NUM> may reproduce the program operation per execution time by assigning a variable(s) to the program. In yet another aspect, simulation system <NUM> may highlight and display any variable having a changed value on program <NUM>.

A user can easily grasp a problem of the program by checking the timing of change of each variable value and change in the program status (program operation) at the same time.

<FIG> is a diagram illustrating a fourth example of the debug screen in simulation system <NUM>. A screen <NUM> includes a program <NUM>, a program flowchart <NUM>, and a variable graph <NUM> generated based on variable value <NUM> of the program recorded in the past.

Simulation system <NUM> may update each variable value displayed on program <NUM> based on the operation input from a user for step reproduction or reverse reproduction. Simulation system <NUM> may highlight and display a currently executed process on flowchart <NUM> based on the operation input from a user for step reproduction or reverse reproduction. Simulation system <NUM> may update each variable graph <NUM> based on the operation input received from a user for step reproduction or reverse reproduction.

Thus, a user can easily grasp a problem of the program by checking the timing of change of each variable value, change in the program status (program operation), and a process on the flowchart currently executed at the same time.

In an aspect, elements included in the screens illustrated in <FIG> may be optionally combined and displayed on display <NUM>. For example, simulation system <NUM> may display, on display <NUM>, simulation scene <NUM>, program <NUM> whose status is reproduced based on variable value <NUM> of the program recorded in the past, flowchart <NUM>, and variable graph <NUM>.

Next, referring to <FIG>, simulation result recording process and debugging process by simulation system <NUM> are described. In an aspect processor <NUM> may read, from storage <NUM> into main memory <NUM>, a program for processing steps of <FIG> to be executed (an optional program of integrated developing environment <NUM>) and then execute the program. In another aspect, the processing steps in whole or in part may be actualized in the form of circuit elements combined to execute these steps.

<FIG> is a flowchart illustrating an example of a simulation recording process by simulation system <NUM>.

In step S1510, simulation system <NUM> starts the simulation based on, for example, an operation input from a user for starting the simulation.

In step S1520, simulation system <NUM> starts to record data in 3D simulation memory <NUM> and in variable memory <NUM>.

In step S1530, simulation system <NUM> repeatedly carries out processes in step S1540 and in subsequent steps until the simulation is completed.

In step S1540, simulation system <NUM> obtains positional information <NUM> of the object in the 3D space and variable value <NUM> of the program for each step of the simulation (or of the program).

In step S1550, simulation system <NUM> transmits the obtained data (simulation log <NUM>, positional information <NUM> of the object in the 3D space, and variable value <NUM> of the program) to data manager <NUM>. Data manager <NUM> commits the obtained data to repository <NUM>.

In step S1560, simulation system <NUM> makes the simulation (or program) proceed to a subsequent step(s).

In step S1570, simulation system <NUM> determines whether recording of the simulation is completed. In an aspect, simulation system <NUM> may determine that recording of the simulation is completed when data for designated cycles is all recorded. In another aspect, simulation system <NUM> may determine that recording of the simulation is completed when a designated flag is put up (or put down). In yet another aspect, simulation system <NUM> may determine that recording of the simulation is completed in response to receipt of an operation input for stoppage of the simulation from a user. Simulation system <NUM> ends the process when it is determined that recording of the simulation is completed (YES in step S1570). Otherwise (NO in step S1570), simulation system <NUM> makes the process proceed to step S1530. In an aspect, simulation system <NUM> may carry out the process of step S1570 in step S1530.

In order to record a program execution result in the real environment, simulation system <NUM> may similarly record the data as described thus far, except for use of camera-captured images, sensor signals, and the like.

<FIG> is a flowchart illustrating an example of the debugging process by simulation system <NUM>.

In step S1610, simulation system <NUM> reproduces a problematic part in the simulation in response to an operation input from a user.

In step S1620, simulation system <NUM> receives an operation input for selection of a variable to be traced. In an aspect, PLC simulator <NUM> or data manager <NUM> may include a feature that receives an operation input for selection of a variable to be traced.

In step S1630, simulation system <NUM> receives an operation input for designating a starting time and an ending time of graph drawing. In an aspect, the starting time and ending time of graph drawing may be designated based on the numbers of cycles and steps of the program at the starting time and the numbers of cycles and steps of the program at the ending time. The processes of steps S1620 and S1630 may be carried out prior to step S1610.

In step S1640, simulation system <NUM> displays, on display <NUM>, a graph showing a variable tracing result (corresponding to graph <NUM> indicative of variable value changes). Simulation system <NUM> may display, on display <NUM>, a graph representing a designated period in response to the input for designating the starting time and ending time of graph drawing in step S1630.

In step S1650, simulation system <NUM> displays, on display <NUM>, the program when a problem occurs. For example, simulation system <NUM> may display, on display <NUM>, the program (variable-inputted program) corresponding to an execution time (steps and cycles) of a relevant problematic simulation scene in response to the simulation scene being displayed on display <NUM> in step S1610.

In step S1660, simulation system <NUM> determines whether an operation input for request of program correction has been received. When it is determined that the program correction request has been received (YES in step S1660), simulation system <NUM> makes the process proceed to step S1670. Otherwise (NO in step S1660), simulation system <NUM> makes the process proceed to step S1680.

In step S1670, simulation system <NUM> reflects the correction in the program.

In step S1680, simulation system <NUM> receives an operation input for reselection of the variable to be traced. For example, a user reselects the variable to be traced when the problematic part of the program displayed in step S1650 fails to be identified, so that the user can search the problematic part of the program from a different perspective.

<FIG> is a flowchart illustrating an example of a comparison process for between a program simulation result by simulation system <NUM> and a program execution result in a real environment.

In step S1710, simulation system <NUM> receives an operation input for condition settings to start the comparison. The comparison-start conditions include conditions under which execution times in the simulation and in the real environment are associated with each other. In an aspect, simulation system <NUM> may, for example, associate the timing of signal output in response to detection of a work or device operation using a particular sensor in the real environment with the execution time in the simulation (<NUM> cycle, one step).

In step S1720, simulation system <NUM> compares simulation log <NUM> and log <NUM> in the real environment at the same execution time (with the same number of program cycles and steps). In an aspect, simulation system <NUM> may compare the variable values or pieces of positional information of the object included in each log or may compare both of these values and information.

In step S1730, simulation system <NUM> determines whether a differential is found between simulation log <NUM> and log <NUM> in the real environment. When it is determined that the differential is found between simulation log <NUM> and log <NUM> in the real environment (YES in step S1730), simulation system <NUM> makes the process proceed to step S1740. Otherwise (NO in step S1730), simulation system <NUM> makes the process proceed to step S1720.

In step S1740, simulation system <NUM> displays the name and value of a differential-identified variable and simulation information. The simulation information described herein includes a simulation scene(s) in differential-confirmed step. In an aspect, the simulation information may include positional information <NUM> of the object in the 3D space.

In step S1750, simulation system <NUM> determines whether a comparison process ending request is received. For example, simulation system <NUM> may receive the comparison process ending request through operation unit <NUM> or network interface <NUM>. Simulation system <NUM> ends the process when it is determined that the comparison process ending request has been received (YES in step S1750). Otherwise (NO in step S1750), simulation system <NUM> makes the process proceed to step S1720.

As described thus far, simulation system <NUM> according to this embodiment includes a feature that records variable value <NUM> of the program and positional information <NUM> of the object in the 3D space during the ongoing simulation in a manner that they are associated with each other per execution time. Simulation system <NUM> further includes a feature that performs per-step reproduction and reverse reproduction of the simulation using positional information <NUM> of the object in the 3D space and variable value <NUM> of the program. Simulation system <NUM> further includes a feature that displays variable value <NUM> of the program and positional information <NUM> of the object in the 3D space for each step. These features may allow a user to reproduce the simulation per step and easily identify a simulation scene(s) suggesting trouble with the operation of any device. Then, a user may easily debug the program by referring to variable value <NUM> of the program in any problematic simulation scene.

Simulation system <NUM> further includes a feature that compares simulation log <NUM> and log <NUM> in the real environment against each other. This may allow a user to easily grasp a problem of the program in the real environment or a problem of the layout of devices.

Claim 1:
A simulation system (<NUM>), comprising:
a simulator (<NUM>) configured to execute a simulation of an operation of a PLC (<NUM>) and an operation of one or more factory automation devices (<NUM>) controlled by the PLC (<NUM>);
a data input unit (<NUM>) configured to obtain in the simulation one or more execution times of a program installed in the PLC (<NUM>), positional information (<NUM>) of each one of one or more objects in a 3D space in the simulation, and a value of each one of one or more variables referred to by the program to operate the one or more factory automation devices;
a data recorder (<NUM>) configured to store, as a first log, the positional information (<NUM>) of the one or more objects and the value (<NUM>) of the one or more variables for each of the one or more execution times in a manner that the positional information (<NUM>) and the value are associated with each other; and
a displayer configured to display the 3D space including the one or more objects reproduced based on the positional information, display the positional information (<NUM>) of the one or more objects and display the value of the one or more variables for each of the one or more execution times included in the first log (<NUM>).