Patent Description:
Conventionally, machine tools that follow computer numerical control (CNC) (hereinafter collectively referred to as "CNC machine tool") are used at various production sites. Such a machine tool is controlled according to a numerical control (NC) program designed by a designer.

<CIT> (PTL <NUM>) discloses a technique for displaying a tool locus on a graphic display device in order to debug the NC program. The graphic display device displays the locus corresponding to the portion of the tool locus selected from the NC program. Thus, the designer can easily check a relationship between the NC program and the tool locus.

<CIT> discloses a numerically controlled device wherein, during working simulation, both a work and a tool are constantly displayed on a display screen at a proper variable display magnification, so that both of a change in shape of the work and movement of the tool can be constantly properly checked. The numerically controlled device is provided with a first processor for numerical control and a second processor for automatic programming. The first processor determines a scale so as to display the work over the full display screen of a display device, calculates a scale so that both of the work and the tool are contained within the display screen on the basis of the current position of the tool each time a numerical control program is executed on a block basis for working simulation, further, discriminates the necessity of a scale change on the basis of the result of comparison between the predetermined scale and a calculated scale and the scale used in displaying the previous program block, and changes the scale as necessary. The second processor performs working simulation on the display screen at a display magnification matching the determined scale.

In recent years, an FA system in which the machine tool controlled according to the NC program and a target instrument controlled according to a sequence program are linkage-operated has been developed. The target instrument is a peripheral device of the machine tool, for example, a conveyance device.

In such an FA system, debugging of the NC program and the sequence program is separately performed. For example, the debugging of the NC program is executed while the locus corresponding to each portion of the NC program is checked on a screen using the technique disclosed in PTL <NUM>. The debugging of the sequence program is executed while transition of a value of a variable updated by execution of the sequence program is checked on the screen. The designer needs to debug each program such that the machine tool controlled according to the NC program and the target instrument controlled according to the sequence program perform the desired linkage operation while the separate screens are checked. For this reason, debugging efficiency is lowered and application development productivity is low.

The present disclosure has been made in view of the above problems, and an object of the present disclosure is to provide a control system, an analysis method, and a program for improving the debugging efficiency of the NC program and the sequence program that control the machine tool and the peripheral target instrument that operate in cooperation with each other.

According to the invention, a control system according to claim <NUM> is provided.

According to this disclosure, the first time information included in the locus information and the second time information included in the variable history information are generated by the first controller and the second controller, which are time-synchronized with each other. For this reason, the first time information and the second time information indicate the time on the common time axis. Accordingly, the designer can easily check a relationship between the operations of the machine tool and the target instrument in the target period by checking the first target portion of the locus corresponding to the target period and the value of the variable in the target period using the display device. As a result, the debugging efficiency of the NC program and the sequence program, which control the machine tool and the target instrument around the machine tool that operate in cooperation with each other, is improved.

The control system may be as specified in claim <NUM>.

According to this disclosure, the designer can designate a portion of the locus indicated by the locus information as the designated section. Because the period corresponding to the designated section is selected as the target period, the designated section is matched with the first target portion. The first target portion in the locus is displayed in the display format different from the remaining portion. Accordingly, the designer can easily check the relative position of the designated section (that is, the first target portion) with respect to the entire locus, and easily check the value of the variable updated in the period (target period) corresponding to the designated section.

According to this disclosure, the designer can designate the period to be checked from the transition of the value of the variable indicated by the variable history information as the designated period. Because the designated period is selected as the target period, the portion in the locus corresponding to the designated period is the first target portion, and the first target portion is displayed on the display device. Consequently, the designer can easily check the relationship between the transition of the value of the variable and the position of the machine tool in the designated period.

In the above disclosure, the support device further includes a third drawing unit that displays a source code of a third target portion executed in the target period of the NC program on the display device.

According to this disclosure, the designer can easily check the relationship between the NC program executed in the target period and the position of the machine tool in the target period, and becomes easy to debug the NC program.

In the above disclosure, the support device further includes a fourth drawing unit that displays a source code of a fourth target portion related to a signal in the sequence program on the display device in response to a fact that a command outputting the signal to the second controller is included in the third target portion of the NC program.

According to this disclosure, the designer can easily check the source code of the sequence program related to the signal output according to the NC program in the target period, and becomes easy to debug the sequence program.

In the above disclosure, the first controller and the second controller are included in one control device, and operate by using a common timer included in the control device.

According to this disclosure, the first controller and the second controller can be easily time-synchronized with each other.

In the above disclosure, the first controller and the second controller include a first timer and a second timer that are time-synchronized with each other, respectively.

According to this disclosure, even when the first controller and the second controller are provided in separate devices, the first controller and the second controller can be easily time-synchronized with each other.

According to the invention, a method according to claim <NUM> is provided.

According to the invention, a computer program according to claim <NUM> is provided.

These disclosures also improve the debugging efficiency of the NC program and the sequence program, which control the machine tool and the target instrument around the machine tool that operate in cooperation with each other.

According to the present disclosure, the debugging efficiency of the NC program and the sequence program, which control the machine tool and the target instrument around the machine tool that operate in cooperation with each other, is improved.

An embodiment of the present invention will be described in detail with reference to the drawings. The same or equivalent portion in the drawings is denoted by the same reference numeral, and the description will not be repeated.

With reference to <FIG>, an example of a scene to which the present invention is applied will be described.

<FIG> is a schematic diagram illustrating an overall configuration example of a control system according to an embodiment. A control system <NUM> in <FIG> includes a control device <NUM>, a support device <NUM>, and a field device <NUM>.

Control device <NUM> corresponds to an industrial controller that controls various facilities and devices. Control device <NUM> is a kind of computer that performs a control arithmetic operation described below, and may be typically embodied as a PLC (programmable logic controller).

Control device <NUM> is connected to various field devices <NUM> through a field network <NUM>. Control device <NUM> exchanges data with one or a plurality of field devices <NUM> through field network <NUM> and the like.

The control arithmetic operation performed by control device <NUM> includes processing (input processing) of collecting data (input data) collected or generated by field device <NUM>, processing (arithmetic processing) of generating data (output data) such as an instruction value to field device <NUM>, and processing (output processing) of transmitting the generated output data to field device <NUM>.

Field network <NUM> preferably adopts a bus or a network that performs constant periodic communication. EtherCAT (registered trademark), EtherNet/IP (registered trademark), DeviceNet (registered trademark), CompoNet (registered trademark), and the like are known as the bus or the network that performs the constant periodic communication. EtherCAT (registered trademark) is preferred in that an arrival time of the data is guaranteed.

Any field device <NUM> can be connected to field network <NUM>. Field device <NUM> includes an actuator that exerts some physical action on a manufacturing device and a production line on the field side, an input and output device that exchanges information with and from the field, and the like.

The data is exchanged between control device <NUM> and field device <NUM> through field network <NUM>. These exchanged data are updated in a very short control period of several hundred µsec order to several tens of msec order.

Control device <NUM> in <FIG> controls a CNC machine tool <NUM> and a conveyance device <NUM> that supplies a workpiece W to CNC machine tool <NUM>.

CNC machine tool <NUM> processes workpiece W by controlling the machining center and the like according to an NC program <NUM> designating a position or speed of a tool <NUM>. Tool <NUM> is a part processing workpiece W. CNC machine tool <NUM> is not limited to the illustrated one, but can be applied to any processing device such as lathe machining, milling machine, and electric discharge machining. Conveyance device <NUM> is controlled according to a sequence program <NUM>.

CNC machine tool <NUM> and conveyance device <NUM> are driven according to the instruction value from control device <NUM>. Workpiece W conveyed by conveyance device <NUM> is disposed on a work table <NUM>, and the processing designated by CNC machine tool <NUM> is performed.

Field device <NUM> in <FIG> includes a remote input and output (I/O) device <NUM>, servo drivers 520_1, 520_2, 520_3, servo motors 522_1, 522_2, 522_3, and a servo driver <NUM>.

Remote I/O device <NUM> typically includes a communication coupler that conducts communication through field network <NUM> and an input and output unit (hereinafter, also referred to as "I/O unit") that acquires the input data and outputs the output data. A device that collects the input data such as an input relay and various sensors (for example, an analog sensor, a temperature sensor, and a vibration sensors), an output relay, a contactor, a servo driver, and a device that exerts some action on the field such as an actuator are connected to remote I/O device <NUM>.

Field device <NUM> is not limited to these, but an arbitrary device (for example, a visual sensor) that collects the input data, an arbitrary device (for example, an inverter device) that exerts some action according to the output data, various robots, and the like can be adopted as field device <NUM>.

Servo motors 522_1, 522_2, 522_3 are incorporated as part of CNC machine tool <NUM>, and servo driver <NUM> drives servo motor <NUM> connected to a conveyor of conveyance device <NUM>. Servo drivers 520_1 to 520_3, <NUM> drive the corresponding servomotors according to the instruction value (a position instruction value, a speed instruction value, and the like) from control device <NUM>.

Servo motors 522_1, 522_2, 522_3 in <FIG> are drive sources for an X-axis, a Y-axis, and a Z-axis of CNC machine tool <NUM>, respectively. Preferably these three axes are integrally controlled.

Control device <NUM> of the embodiment generates an instruction value according to a sequence command and a motion command by executing sequence program <NUM>, and generates an instruction value controlling the behavior of CNC machine tool <NUM> by executing NC program <NUM>. A start and an end of the execution of NC program <NUM> may be controlled by the control instructions included in sequence program <NUM>.

A support device <NUM> can be connected to control device <NUM>. Support device <NUM> is a device that supports preparation required for control device <NUM> to control the control target. Specifically, support device <NUM> provides a development environment (program producing and editing tool, parser, compiler, and the like) of a program (including NC program <NUM> and sequence program <NUM>) executed by control device <NUM>, the control device <NUM>, a setting environment for setting the configuration information (configuration) of control device <NUM> and various devices connected to control device <NUM>, a function of outputting the generated program to control device <NUM>, a function of modifying and changing (debugging) the program executed on control device <NUM> online, and the like.

<FIG> is a schematic diagram illustrating a functional configuration example of control device <NUM> of the embodiment. Control device <NUM> in <FIG> includes a sequence controller <NUM>, an NC controller <NUM>, and a shared memory <NUM>.

As used herein, the term "sequence program" includes a program, in which the entire program is scanned for each execution and one or a plurality of instruction values are calculated for each execution. The "sequence program" typically includes a program including one or the plurality of commands written according to International Standard IEC <NUM>-<NUM> defined by International Electrotechnical Commission (IEC). The "sequence program" can include a sequence command and/or a motion command. The "sequence program" is not limited to the command described according to the international standard IEC <NUM>-<NUM>, but may include the command independently defined by a manufacturer or a vendor of a programmable logic controller (PLC). The "sequence program" is suitable for control that requires immediacy and high speed.

A source code of the "sequence program" includes a variable name, a variable type, an LD/ST command, and a parameter.

The "NC program" is a program that is sequentially interpreted, and is written in a language that can be executed by an interpreter type that is executed by sequential interpretation line by line. For example, NC program <NUM> is written using "G language".

The source code of the "NC program" includes a block number, a G code number or an M code number, and a parameter for each line (block). The G-code prescribes a preparatory function such as positioning and orientation designation of machine tool <NUM>. The M code prescribes an auxiliary function for processing. The M code includes a code for outputting an external signal. The external signal can also be used in the source code of sequence program <NUM>.

Sequence controller <NUM> scans entire sequence program <NUM> every control period and updates instruction value <NUM>. More specifically, sequence controller <NUM> executes (scans) sequence program <NUM> at predetermined control periods according to a timer <NUM> included in control device <NUM> to update one or a plurality of instruction values <NUM>. Sequence program <NUM> can include the sequence command and the motion command. The sequence command prescribes one or a plurality of logical arithmetic operations including an input value, an output value, and an internal value. The motion command prescribes a numerical arithmetic procedure such as position, speed, acceleration, jerk, angle, angular velocity, angular acceleration, and angular jerk for an actuator such as a servo motor.

Sequence controller <NUM> includes a variable management unit <NUM> that manages the variable updated by the execution of sequence program <NUM>. The "variable" can include the input data acquired from field device <NUM>, the output data (instruction value <NUM>) given to field device <NUM>, and the data temporarily calculated to execute the control arithmetic operation. The value of the variable is updated in each control period. Variable management unit <NUM> generates variable history information <NUM> in which the value of the variable and the time information about the control period are associated with each other in each control period. The time information included in variable history information <NUM> is generated according to timer <NUM> and indicates the update time of the value of the variable.

NC controller <NUM> updates an instruction value <NUM> in each control period according to NC program <NUM> that is sequentially interpreted. More specifically, NC controller <NUM> executes NC program <NUM> by the interpreter type. However, the calculation (update) of instruction value <NUM> by NC controller <NUM> is repeatedly executed in each control period. NC controller <NUM> calculates instruction value <NUM> according to NC program <NUM> in synchronization with the calculation of instruction value <NUM> by sequence controller <NUM> according to timer <NUM>. In order to implement the calculation of instruction value <NUM> in each control period, NC controller <NUM> includes an interpreter <NUM> and an NC instruction value arithmetic unit <NUM>.

Interpreter <NUM> interprets at least a part of NC program <NUM>, generates an intermediate code, and sequentially stores the generated intermediate code in an intermediate code buffer (not illustrated). Interpreter <NUM> previously generates the intermediate code from NC program <NUM> to some extent. For this reason, sometimes a plurality of intermediate codes are stored in the intermediate code buffer.

NC instruction value arithmetic unit <NUM> calculates instruction value <NUM> in each control period according to the intermediate code generated previously by interpreter <NUM>. In general, because the instruction (code) described in the NC program is sequentially interpreted, there is no guarantee that instruction value <NUM> can be calculated in each arithmetic period. However, using the intermediate code, the instruction value <NUM> can be calculated in each control period.

<FIG> is a schematic diagram conceptually illustrating processing performed by the NC controller of the control device of the embodiment.

In general, the NC program contains the code that is sequentially interpreted by the interpreter type, and the time required for sequentially interpreting each code varies depending on a content described by each code. That is, because the sequential interpretation is performed by the interpreter type, the instruction value is not easily calculated in each control period.

Accordingly, in control device <NUM> of the embodiment, interpreter <NUM> of NC controller <NUM> interprets one or the plurality of codes described in NC program <NUM>, and generates the intermediate code to calculate the instruction value in each control period based on the interpreted content. Because the intermediate code is generated for each one or the plurality of codes described in NC program <NUM>, a plurality of intermediate codes are usually generated from one NC program <NUM>. The generated intermediate code is sequentially queued in the intermediate code buffer.

In each intermediate code, a function capable of calculating the instruction value by inputting the variable related to time may be prescribed. That is, the intermediate code may be a function for NC instruction value arithmetic unit <NUM> to update the instruction value in every control period. Using such a function, NC instruction value arithmetic unit <NUM> can calculate the instruction value in each control period by sequentially referring to the generated intermediate code.

More specifically, the intermediate code may be a function that prescribes the relationship between the time and the instruction value. The time, the elapsed time from a certain reference timing, the number of cumulative cycles of the control periods, and the like can be used as the time-related variable prescribing the intermediate code.

For example, when the first intermediate code prescribes the instruction value over a period of <NUM> times the control period, NC instruction value arithmetic unit <NUM> queues the first intermediate code to calculate periodically the instruction value over the period of <NUM> control periods. Similarly, for other intermediate codes, the instruction value can be basically calculated over a plurality of control periods.

Accordingly, when the intermediate code generation processing from NC program <NUM> by interpreter <NUM> is executed sufficiently earlier than the instruction value arithmetic processing by NC instruction value arithmetic unit <NUM>, the processing according to NC program <NUM> can be executed in synchronization with the processing according to sequence program <NUM>.

<FIG> is a schematic diagram illustrating a specific example of the processing in the NC controller. As illustrated in <FIG>, when executing sequentially NC program <NUM>, interpreter <NUM> of NC controller <NUM> interprets each command contained in NC program <NUM> ((<NUM>) program interpretation). A prescribed orbit is internally generated by the interpretation of the command ((<NUM>) orbit generation). Finally, interpreter <NUM> generates one or a plurality of functions (intermediate codes) that prescribe the generated orbit ((<NUM>) intermediate code generation).

As an example of the intermediate code, it may be a function that prescribes the relationship between the time and the instruction value (the position instruction value or the speed instruction value). The orbit in <FIG> is prescribed by a combination of straight lines. The orbit for each straight line is represented by functions F1(t), F2(t), F3(t) that indicate the relationship between the time and the position.

NC instruction value arithmetic unit <NUM> of NC controller <NUM> calculates the instruction value in each control period according to the generated intermediate code. In the example of <FIG>, the instruction value at that time is uniquely determined by inputting the time of each control period in functions F1(t), F2(t), F3(t).

Returning to <FIG>, NC instruction value arithmetic unit <NUM> generates locus information <NUM> in which the position of tool <NUM> corresponding to instruction value <NUM> calculated in each control period and the time information indicating the control time using the instruction value are associated with each other. The time information is generated using timer <NUM>.

Support device <NUM> provides a screen (hereinafter, referred to as "support screen") that assists the debugging of sequence program <NUM> and NC program <NUM> to the designer.

<FIG> is a view illustrating an outline of support screen generation processing performed by the support device. Support device <NUM> acquires variable history information <NUM> and locus information <NUM> from control device <NUM>. The support screen includes a window <NUM> displaying the locus indicated by acquired locus information <NUM>, and a window <NUM> displaying the transition of the value of the variable indicated by variable history information <NUM>. For example, the transition of the value of the variable is expressed using a graph.

Support device <NUM> selects the target period according to the operation by the designer. For example, support device <NUM> may accept the input of a part of a section (designated section) of the locus displayed in window <NUM>, and select the period corresponding to the designated section as the target period. Alternatively, support device <NUM> may accept the input of a part of the period (designated period) in the graph displayed in window <NUM>, and select the designated period as the target period.

When the target period is selected, support device <NUM> displays a first target portion <NUM> corresponding to the target period in the loci indicated by locus information <NUM> in the window <NUM>. In the example of <FIG>, support device <NUM> displays first target portion <NUM> in a display format different from another portions in window <NUM>. Furthermore, support device <NUM> displays a second target portion <NUM> corresponding to the target period in the transition of the value of the variable indicated by variable history information <NUM> in window <NUM>.

As described above, variable history information <NUM> and locus information <NUM> include the time information generated using common timer <NUM>. For this reason, the time information included in variable history information <NUM> and the time information included in locus information <NUM> indicate the time on the same time axis. Accordingly, by checking first target portion <NUM> and second target portion <NUM> displayed in windows <NUM> and <NUM> respectively, the designer can easily check the relationship between the operations of machine tool <NUM> and conveyance device <NUM> during the target period. As a result, the debugging efficiency of the NC program and the sequence program, which control the machine tool and the target instrument around the machine tool that operate in cooperation with each other, is improved.

Support device <NUM> may include a window <NUM> displaying the source code of NC program <NUM> in the support screen.

In window <NUM>, support device <NUM> displays a third target portion <NUM> of NC program <NUM> executed during the target period. In window <NUM> of <FIG>, the source code (the source codes of block numbers "<NUM>" to "<NUM>") of third target portion <NUM> is displayed in the display format different from the source code of other portions. Consequently, the designer easily checks the debugging of the NC program.

Support device <NUM> may include a window <NUM> displaying the source code of sequence program <NUM> in the support screen.

Support device <NUM> may display the source code of a fourth target portion <NUM> related to a signal in sequence program <NUM> in window <NUM> in response to the fact that the source code of third target portion <NUM> executed in the target period in NC program <NUM> includes the command outputting the signal to sequence controller <NUM>.

An M code number prescribing the external signal output by the execution of NC program <NUM> may be described in the parameter included in the source code of sequence program <NUM>. For this reason, support device <NUM> may extract the source code including the M code number from sequence program <NUM> in response to the fact that the M code number is included in the source code of third target portion <NUM> executed in the target period in NC program <NUM>. The source code including the M code number is related to the signal output from NC controller <NUM> to sequence controller <NUM>.

The source code of fourth target portion <NUM> including a M code number "<NUM>" described in block number "<NUM>" of NC program <NUM> in sequence program <NUM> is displayed in window <NUM> of <FIG>. Consequently, the designer easily debugs sequence program <NUM>.

A specific example of control system <NUM> of the embodiment will be described.

<FIG> is a block diagram illustrating a hardware configuration example of the control device included in the control system of the embodiment. As illustrated in <FIG>, control device <NUM> is an arithmetic processing unit called a CPU unit, and include a processor <NUM>, a chipset <NUM>, a main storage device <NUM>, a secondary storage device <NUM>, a host network controller <NUM>, a universal serial bus (USB) controller <NUM>, a memory card interface <NUM>, an internal bus controller <NUM>, a field network controller <NUM>, and timer <NUM>.

Processor <NUM> is configured of a central processing unit (CPU), a micro processing unit (MPU), a graphics processing unit (GPU), and the like. As processor <NUM>, a configuration including a plurality of cores may be adopted, or a plurality of processors <NUM> may be disposed. Chipset <NUM> implements the processing of control device <NUM> as a whole by controlling processor <NUM> and a peripheral element. Main storage device <NUM> is configured of a volatile storage device such as a dynamic random access memory (DRAM) and a static random access memory (SRAM). Secondary storage device <NUM> is configured of a nonvolatile storage device such as a hard disk drive (HDD) and a solid state drive (SSD).

Processor <NUM> reads various programs stored in secondary storage device <NUM>, expands the various programs in main storage device <NUM>, and executes the various programs to implement the control according to the control target and various pieces of processing as described later. In addition to system program <NUM> implementing the basic functions, a user program (sequence program <NUM> and NC program <NUM>) produced according to the manufacturing device and facility of the control target is stored in secondary storage device <NUM>.

Host network controller <NUM> controls the data exchange with a server device (not illustrated) or the like through a host network. USB controller <NUM> controls the data exchange with support device <NUM> through USB connection.

Memory card interface <NUM> is configured such that a memory card <NUM> is detachably attached, and memory card interface <NUM> can write the data in memory card <NUM> and read various data (user programs, trace data, and the like) from memory card <NUM>.

Internal bus controller <NUM> controls the data exchange with I/O unit <NUM> mounted on control device <NUM>. Field network controller <NUM> controls the data exchange with field device <NUM> through field network <NUM>.

For example, timer <NUM> is a counter that is incremented or decremented according to a time lapse.

Although the configuration example in which the required functions are provided by processor <NUM> executing the program has been illustrated in <FIG>, some or all of these provided functions may be mounted using a dedicated hardware circuit (for example, ASIC or FPGA). Alternatively, a main part of control device <NUM> may be implemented using hardware (for example, an industrial personal computer based on a general-purpose personal computer) according to a general-purpose architecture. In this case, a plurality of operating systems (OSs) having different uses may be executed in parallel using a virtualization technology, and the required application may be executed on each OS.

In control system <NUM> of <FIG>, control device <NUM> and support device <NUM> are configured as separate bodies, but a configuration in which all or a part of these functions is integrated into a single device may be adopted.

<FIG> is a schematic diagram illustrating a hardware configuration example of the support device included in the control system of the embodiment. For example, support device <NUM> is implemented using hardware (for example, a general-purpose personal computer) according to a general-purpose architecture.

As illustrated in <FIG>, support device <NUM> includes a processor <NUM>, a main memory <NUM>, an input device <NUM>, a display device <NUM>, a storage <NUM>, an optical drive <NUM>, and a USB controller <NUM>. These components are connected to each other through a processor bus <NUM>.

Processor <NUM> is configured of a CPU, a GPU, and the like, and reads a program (as an example, an OS <NUM> and a support program <NUM>) stored in storage <NUM>, expands the program in main memory <NUM>, and executes the program, thereby implementing various pieces of processing for control system <NUM>.

Main memory <NUM> is configured of a volatile storage device such as a DRAM or an SRAM. For example, storage <NUM> includes a non-volatile storage device such as an HDD or an SSD.

In addition to OS <NUM> implementing the basic function, support program <NUM> providing the function as support device <NUM> is stored in storage <NUM>. That is, support program <NUM> is executed by a computer connected to control device <NUM>, thereby implementing support device <NUM> of the embodiment.

Input device <NUM> is configured of a keyboard, a mouse, and the like, and receives a user operation. Display device <NUM> displays a processing result and the like from processor <NUM>.

USB controller <NUM> exchanges the data with control device <NUM> and the like through the USB connection.

Support device <NUM> includes optical drive <NUM>, and a program stored in a recording medium <NUM> (for example, an optical recording medium such as a digital versatile disc (DVD)) in which a computer-readable program is non-transiently stored is read and installed in storage <NUM> or the like.

Support program <NUM> and the like executed by support device <NUM> may be installed through computer-readable recording medium <NUM>, or installed by being downloaded from the server device or the like on the network. Sometimes the functions provided by support device <NUM> of the embodiment are implemented using a part of modules provided by the OS.

Although the configuration example in which the required functions as support device <NUM> are provided by processor <NUM> executing the program has been described in <FIG>, some or all of these provided functions may be mounted using a dedicated hardware circuit (for example, ASIC or FPGA).

<FIG> is a view illustrating an example of the variable history information. As described above, variable history information <NUM> is generated by variable management unit <NUM> (see <FIG>) of control device <NUM>.

Variable history information <NUM> in <FIG> is a set of elements <NUM>. Element <NUM> is information in which an index identifying the control period in which the variable is updated, time information indicating the time of the control period, and variable information are associated with one another. The variable information includes a variable name, a variable type, and a value of the variable. The index is a continuous number. For example, the time information is a start time, an end time, or a time (instruction start time) designated by the user in the corresponding control period. The time information is generated using timer <NUM>, and indicates, for example, a count value of timer <NUM>.

Variable management unit <NUM> generates element <NUM> in each control period for each variable updated by the execution of sequence program <NUM>, and adds generated element <NUM> to variable history information <NUM>.

<FIG> is a view illustrating an example of the locus information. As described above, locus information <NUM> is generated by NC instruction value arithmetic unit <NUM> (see <FIG>) of control device <NUM>.

Locus information <NUM> exemplified in <FIG> includes an element <NUM> for each control period. Element <NUM> is information in which the position information about tool <NUM> (see <FIG>) (hereinafter referred to as "tool point position information"), the block number, and the time information are associated with one another.

The tool point position information indicates the position of tool <NUM> corresponding to instruction value <NUM> of the corresponding control period. The tool point position information includes an X-axis position coordinate, a Y-axis position coordinate, and a Z-axis position coordinate. NC instruction value arithmetic unit <NUM> generates the tool point position information based on instruction value <NUM> (the position instruction value or the speed instruction value). As described with reference to <FIG> and <FIG>, instruction value <NUM> is calculated according to the intermediate code generated by sequentially interpreting each line (block) of NC program <NUM>. NC instruction value arithmetic unit <NUM> generates an element <NUM>, in which the tool point position information generated based on instruction value <NUM>, the block number corresponding to the intermediate code used for the calculation of instruction value <NUM>, and the time information indicating the control time in which instruction value <NUM> is used are associated with one another, in each control period. For example, the control time is a start time, an end time, or a time (command start time) designated by the user in the corresponding control period. NC instruction value arithmetic unit <NUM> adds generated element <NUM> to locus information <NUM>. The time information is generated using timer <NUM>, and indicates, for example, the count value of timer <NUM>.

The time of the plurality of control periods can be input to the intermediate code (for example, function F1(t) in <FIG>) generated by interpreting one line (block) of NC program <NUM>. Accordingly, a plurality of elements <NUM> including the same block number can be continuous in locus information <NUM>.

NC program <NUM> can also include a line (block) that prescribes the M code and a line (block) that prescribes stop or wait. The intermediate code generated by interpreting such lines (blocks) indicates that the position of tool <NUM> is constant. Accordingly, the plurality of elements <NUM> including the same tool point position information can be continuous in locus information <NUM>.

<FIG> is a view illustrating a functional configuration example of the support device. <FIG> illustrates the configuration related to the function that assists the debugging of sequence program <NUM> and NC program <NUM> that are executed on control device <NUM>. As illustrated in <FIG>, support device <NUM> includes a first analysis unit <NUM>, a second analysis unit <NUM>, a third analysis unit <NUM>, and a fourth analysis unit <NUM>.

First analysis unit <NUM> acquires locus information <NUM> from control device <NUM> and executes analysis processing for locus information <NUM>. First analysis unit <NUM> includes a drawing unit <NUM>, an input reception unit <NUM>, and a target portion determination unit <NUM>.

Drawing unit <NUM> displays the locus indicated by locus information <NUM> on display device <NUM> (see <FIG>). Specifically, drawing unit <NUM> generates line segment information based on locus information <NUM>, and draws the locus according to the line segment information.

<FIG> is a view illustrating an example of the line segment information. Line segment information <NUM> in <FIG> includes an element <NUM> for each line segment. Element <NUM> is information in which a line segment object ID, a start point of the line segment, an end point of the line segment, and the block number are associated with one another. Drawing unit <NUM> generates one element <NUM> using two consecutive elements <NUM> (see <FIG>) in locus information <NUM>. Specifically, drawing unit <NUM> generates an element <NUM> when the tool point position information indicated by first element <NUM> having the old time in two consecutive elements <NUM> in locus information <NUM> is set to the start point while the tool point position information indicated by second element <NUM> having the new time is set to the end point. Drawing unit <NUM> includes the block number of second element <NUM> in element <NUM>. Furthermore, drawing unit <NUM> includes unique line segment object ID in element <NUM>. Drawing unit <NUM> generates element <NUM> for each of all combinations of two consecutive elements <NUM> in locus information <NUM>. In this way, line segment information <NUM> is generated.

As described above, a plurality of elements <NUM> including the same tool point position information can be continuous in locus information <NUM>. For this reason, element <NUM> in which the start point and the end point are matched with each other can be included in line segment information <NUM>. The line segment corresponding to element <NUM> becomes a point. For this reason, in the present specification, the "line segment" can also include the "point".

Drawing unit <NUM> displays a virtual space on display device <NUM>. Drawing unit <NUM> disposes the line segment connecting the start point and the end point on the virtual space for each of all elements <NUM> included in line segment information <NUM>. The line in which the line segments corresponding to all elements <NUM> included in line segment information <NUM> are connected in order indicates the locus indicated by locus information <NUM>. Thus, the designer can recognize the locus of tool <NUM> in executing NC program <NUM> by checking display device <NUM>.

Input reception unit <NUM> receives the input of the designated section of the locus displayed on display device <NUM>. The designated section contains one or a plurality of consecutive line segments.

<FIG> is a view illustrating an example of a window that accepts the input of the designated section. Window <NUM> in <FIG> includes two points 66a, 66b on the locus. Input reception unit <NUM> receives the section from point 66a to point 66b as the designated section. The positions of points 66a, 66b are variable depending on the operation onto input device <NUM> (see <FIG>). Consequently, the designer may change the positions of points 66a, 66b such that points 66a, 66b are included in the desired line segment.

The method for inputting the designated section is not limited to the example illustrated in <FIG>. For example, input reception unit <NUM> may receive a click at an arbitrary point on the locus. In this case, input reception unit <NUM> may determine the line segment including the clicked point as the designated section. Alternatively, input reception unit <NUM> may determine all the line segments corresponding to the same block number as the block number corresponding to the line segment including the clicked point as the designated section. Thus, the user can designate the designated section in units of blocks of NC program <NUM>.

Target portion determination unit <NUM> determines the first target portion that is a highlighting target in the locus indicated by locus information <NUM>. Target portion determination unit <NUM> determines the portion corresponding to the target period in the locus indicated by locus information <NUM> as the first target portion. Target portion determination unit <NUM> outputs line segment object ID corresponding to the first target portion to drawing unit <NUM>. Drawing unit <NUM> displays the line segment (first target portion) of line segment object ID received from target portion determining unit <NUM> in the display format different from that of other line segments. For example, the first target portion is displayed with a thicker line than the other portions. Alternatively, the first target portion may be displayed in a color (for example, red) different from that of other portions (for example, black).

Target portion determination unit <NUM> determines the first target portion according to one of the following two methods (a), (b).

Furthermore, when input reception unit <NUM> receives the designated section, target portion determination unit <NUM> selects the period corresponding to the designated section as the target period. Specifically, target portion determination unit <NUM> extracts element <NUM> corresponding to all the line segments included in the designated section from line segment information <NUM>. Target portion determination unit <NUM> extracts, from the locus information <NUM>, element <NUM> including the tool point position information and the block number which are matched with the end point and the block number included in extracted element <NUM>. Target portion determination unit <NUM> determines the target period based on the time information included in extracted element <NUM>.

When extracting the plurality of consecutive elements <NUM> from locus information <NUM>, target portion determination unit <NUM> determines the period from the time of the time information included in first element <NUM> of the plurality of elements <NUM> to the time of the time information included in last element <NUM> as the target period. When extracting only one element <NUM> from locus information <NUM>, target portion determination unit <NUM> determines the time of the time information included in extracted element <NUM> as the target period.

In this way, input reception unit <NUM> and target portion determination unit <NUM> operate as a selection unit that receives the input of the designated section in the loci displayed on display device <NUM> and selects the period corresponding to the designated section based on locus information <NUM> as the target period.

Target position determination unit <NUM> outputs the target period information indicating the target period to second analysis unit <NUM> according to the selection of the target period.

Furthermore, target portion determination unit <NUM> extracts element <NUM> having the time information belonging to the target period from locus information <NUM> according to the selection of the target period, and outputs the block number included in extracted element <NUM> to third analysis unit <NUM>. In response to the reception of the target period information from second analysis unit <NUM>, target portion determination unit <NUM> extracts element <NUM> having the time information belonging to the target period indicated by the target period information from locus information <NUM>, and outputs the block number included in element <NUM> to third analysis unit <NUM>. The block number output from target portion determination unit <NUM> to third analysis unit <NUM> corresponds to the portion of NC program <NUM> executed during the target period.

Second analysis unit <NUM> acquires variable history information <NUM> from control device <NUM> and executes analysis processing for variable history information <NUM>. The type of the variable that is analysis target is previously set by a setter. For this reason, second analysis unit <NUM> may acquire variable history information <NUM> corresponding to the variable of the previously-set type from control device <NUM>. Second analysis unit <NUM> includes a drawing unit <NUM>, an input reception unit <NUM>, and a target portion determination unit <NUM>.

Drawing unit <NUM> displays the value of the variable indicated by variable history information <NUM> on display device <NUM> (see <FIG>). For example, drawing unit <NUM> displays the graph illustrating the transition of the value of the variable on display device <NUM>.

Input reception unit <NUM> receives the input of the designated period in the transition of the value of the variable displayed on display device <NUM>.

<FIG> is a view illustrating an example of a window illustrating a change in variable value. Window <NUM> in <FIG> includes sliders 67a, 67b setting the start time and the end time of the designated period. Furthermore, window <NUM> includes input fields 68a, 68b in which the times of sliders 67a, 67b are input. Input reception unit <NUM> receives the input for the designated period using sliders 67a, 67b or input fields 68a, 68b.

Target portion determination unit <NUM> determines the second target portion that is the display target (or the highlighting target) in the transition of the value of the variable indicated by variable history information <NUM>. Target portion determination unit <NUM> determines the portion corresponding to the target period in the transition of the value of the variable indicated by variable history information <NUM> as the second target portion. For example, the second target portion is specified by one or a plurality of consecutive indexes (see <FIG>) included in variable history information <NUM>. Target portion determination unit <NUM> outputs the index specifying the determined second target portion to drawing unit <NUM>. The drawing unit <NUM> displays only the value of the variable corresponding to the index received from target portion determination unit <NUM> in the window <NUM>. Alternatively, drawing unit <NUM> displays the value of the variable corresponding to the index received from target portion determination unit <NUM> in the display format different from the value of the variable corresponding to another index.

Target portion determination unit <NUM> determines the second target portion according to one of the following two methods (A), (B).

Furthermore, when input reception unit <NUM> receives the input of the designated period, target portion determination unit <NUM> selects the designated period as the target period. In this way, input reception unit <NUM> and target portion determination unit <NUM> operate as the selection unit that receives the input of the designated period in the transitions of the values of the variables displayed on display device <NUM> and selects the designated period as the target period. Target portion determination unit <NUM> outputs the target period information indicating the target period to first analysis unit <NUM> according to the selection of the target period.

Third analysis unit <NUM> acquires the source code of NC program <NUM> from control device <NUM>, and performs the analysis processing on NC program <NUM>. The source code of NC program <NUM> includes the block number, the G code number or the M code number, and the parameter for each line (block) as described above. Third analysis unit <NUM> includes a target portion determination unit <NUM> and a drawing unit <NUM>.

Target portion determination unit <NUM> determines the third target portion that is the display target (or the highlighting target) in NC program <NUM>. Target portion determination unit <NUM> determines the portion of NC program <NUM> executed during the target period as the third target portion. Specifically, target portion determination unit <NUM> determines the line (block) of the block number received from first analysis unit <NUM> as the third target portion. As described above, the block number output from target portion determination unit <NUM> of first analysis unit <NUM> to third analysis unit <NUM> is the portion of NC program <NUM> executed during the target period.

When the M code number is included in the third target portion, target portion determination unit <NUM> outputs the M code number to fourth analysis unit <NUM>.

Drawing unit <NUM> displays the source code of the third target portion determined by target portion determination unit <NUM> on display device <NUM>. Drawing unit <NUM> may display only the source code of the third target portion on display device <NUM>. Alternatively, drawing unit <NUM> may display the source code of the third target portion and the source codes of the block numbers above and below the third target portion on display device <NUM>, and display the source code of the third target portion in the display format different from other source codes.

Thus, the designer can easily check the source code of the third target portion of NC program <NUM> executed during the target period.

Fourth analysis unit <NUM> acquires the source code of sequence program <NUM> from control device <NUM> and performs analysis processing on sequence program <NUM>. The source code of sequence program <NUM> includes the LD/ST command and the parameter as described above. Fourth analysis unit <NUM> includes a target portion determination unit <NUM> and a drawing unit <NUM>.

Target portion determination unit <NUM> determines the fourth target portion that is the display target (or the highlighting target) in sequence program <NUM>. Target portion determination unit <NUM> determines the portion including the M code number received from third analysis unit <NUM> in sequence program <NUM> as the fourth target portion. As described above, target portion determination unit <NUM> of third analysis unit <NUM> outputs the M code number included in the third target portion executed in the target period of NC program <NUM> to fourth analysis unit <NUM>. The M code number includes the number corresponding to the command (function) that outputs the signal to the outside. Accordingly, the fourth target portion determined by target portion determination unit <NUM> is the portion of sequence program <NUM> related to the signal output from NC controller <NUM> during the target period.

Drawing unit <NUM> displays the source code of the fourth target portion determined by target portion determination unit <NUM> on display device <NUM>. Drawing unit <NUM> may display only the source code of the fourth target portion on display device <NUM>. Alternatively, drawing unit <NUM> may display the source code of the fourth target portion and the source code above and below the fourth target portion on display device <NUM>, and display the source code of the fourth target portion in the display format different from other source codes.

Thus, the designer can easily check the source code of the fourth target portion related to the signal output from NC controller <NUM> during the target period of sequence program <NUM>.

Referring to <FIG>, the processing flow in support device <NUM> when the target period is selected from the locus will be described. <FIG> is a flowchart illustrating an example of the processing flow in the first analysis unit when the target period is selected from the locus. <FIG> is a flowchart illustrating an example of the processing flow in the second analysis unit when the target period is selected from the locus. <FIG> is a flowchart illustrating an example of the processing flow in the third analysis unit. <FIG> is a flowchart illustrating an example of the processing flow in the fourth analysis unit. <FIG> is a view illustrating an example of the support screen displayed on the display device.

As illustrated in <FIG>, first analysis unit <NUM> generates line segment information <NUM> from locus information <NUM>, and displays the locus of tool <NUM> in the execution of NC program <NUM> according to line segment information <NUM> on display device <NUM> (step S1). As illustrated in <FIG>, locus <NUM> of tool <NUM> is displayed in window <NUM> of display device <NUM>.

Subsequently, first analysis unit <NUM> receives the selection of one or the plurality of continuous line segments on displayed locus <NUM> (step S2). First analysis unit <NUM> extracts line segment object ID of the selected line segment (hereinafter referred to as "target line segment object ID") from line segment information <NUM> (step S3). First analysis unit <NUM> highlights the line segment of target line segment object ID (that is, first target portion <NUM>) (step S4). In the example of <FIG>, first target portion <NUM> is displayed thicker than other line segments.

Subsequently, first analysis unit <NUM> extracts the end point and the block number corresponding to target line segment object ID from line segment information <NUM> (step S5).

Subsequently, first analysis unit <NUM> determines whether the block number extracted from line segment information <NUM> exists in locus information <NUM> (step S6). When the extracted block number does not exist in locus information <NUM> (NO in step S6), first analysis unit <NUM> displays an error message on display device <NUM> (step S7), and ends the processing. The error message indicates that locus information <NUM> is incomplete.

When the extracted block number exists in locus information <NUM> (YES in step S6), first analysis unit <NUM> outputs the extracted block number (hereinafter referred to as "target block number") to third analysis unit <NUM> (step S8). When the plurality of continuous line segments are selected in step S2 and when the plurality of block numbers are extracted in step S5, all of the plurality of block numbers are the target block numbers.

Subsequently, first analysis unit <NUM> extracts the time information about element <NUM> including the tool point position information and the block number that are matched with the end point and the block number extracted in step S5 from locus information <NUM> (step S9). First analysis unit <NUM> selects the target period based on the time information extracted in step S9 (step S10). First analysis unit <NUM> outputs the target period information indicating the selected target period to second analysis unit <NUM> (step S11). After step S11, first analysis unit <NUM> ends the processing.

As illustrated in <FIG>, second analysis unit <NUM> acquires the target period information from first analysis unit <NUM> (step S21). Second analysis unit <NUM> determines whether the time information belonging to the target period indicated by the target period information exists in variable history information <NUM> (step S12). When the time information belonging to the target period does not exist in variable history information <NUM> (NO in step S12), second analysis unit <NUM> ends the processing.

When the time information belonging to the target period exists in variable history information <NUM> (YES in step S12), second analysis unit <NUM> extracts element <NUM> (element <NUM> corresponding to the target period) including the time information belonging to the target period from variable history information <NUM> (step S23). Second analysis unit <NUM> displays the transition of the value of the variable included in extracted element <NUM> on display device <NUM> (step S24). Element <NUM> extracted in step S23 corresponds to the target period. For this reason, the transition displayed in step S24 is second target portion <NUM> corresponding to the target period in the transition of the value of the variable indicated by variable history information <NUM>. As illustrated in <FIG>, second target portion <NUM> is represented in a graph format in window <NUM>. After step S24, second analysis unit <NUM> ends the processing.

In step S14, second analysis unit <NUM> may display the transition of the value of the variable of element <NUM> corresponding to not only the target period but also the period including before and after the target period on window <NUM>. In this case, second analysis unit <NUM> displays second target portion <NUM> in the display format different from the values of the variables in other periods.

As illustrated in <FIG>, third analysis unit <NUM> acquires the target block number from first analysis unit <NUM> (step S31). Third analysis unit <NUM> determines whether the target block number is described in NC program <NUM> (step S32). When the target block number is not described in NC program <NUM> (NO in step S32), third analysis unit <NUM> displays an error message on display device <NUM> (step S33), and ends the processing. The error message indicates that NC program <NUM> does not include the block number that is presumed to be executed during the target period.

When the target block number is described in NC program <NUM> (YES in step S32), third analysis unit <NUM> displays the source code of the target block number in NC program <NUM> on display device <NUM> (step S34). The target block number corresponds to the source code executed in the target period. Accordingly, the source code displayed in step S34 is third target portion <NUM> of NC program <NUM> executed during the target period. As illustrated in <FIG>, third target portion <NUM> is displayed in window <NUM> in the display format (shaded) different from other portions of NC program <NUM>.

Third analysis unit <NUM> determines whether the source code of the target block number includes the M code number (step S35). When the source code of the target block number does not include the M code number (NO in step S35), third analysis unit <NUM> ends the processing. When the source code of the target block number includes the M code number (YES in step S25), third analysis unit <NUM> outputs the M code number (hereinafter, referred to as "target M code number") included in the source code of the target block number to fourth analysis unit <NUM> (step S36), and ends the processing.

As illustrated in <FIG>, fourth analysis unit <NUM> acquires the target M code number from third analysis unit <NUM> (step S41). Fourth analysis unit <NUM> determines whether the command related to the target M code number is described in sequence program <NUM> (step S42). When the command related to the target M code number is not described in sequence program <NUM> (NO in step S42), fourth analysis unit <NUM> ends the processing.

When the command related to the target M code number is described in sequence program <NUM> (YES in step S42), fourth analysis unit <NUM> displays the source code of the command related to the target M code number in sequence program <NUM> on display device <NUM> (step S43). The target M code number is included in the third target portion of NC program <NUM> executed in the target period. Accordingly, the source code displayed in step S43 becomes fourth target portion <NUM> that is the command related to the signal output to sequence controller <NUM> in sequence program <NUM>. In the support screen of <FIG>, the source code of fourth target portion <NUM> related to the target M code number is displayed in window <NUM>.

In step S43, fourth analysis unit <NUM> may display not only fourth target portion <NUM> related to the target M code number but also the source codes of the commands before and after fourth target portion <NUM> in window <NUM>. In this case, fourth analysis unit <NUM> displays the source code of fourth target portion <NUM> in the display format different from other source codes.

Referring to <FIG> and <FIG>, the processing flow in support device <NUM> when the target period is selected from variable history information <NUM> will be described. <FIG> is a flowchart illustrating an example of the processing flow in the second analysis unit when the target period is selected from the variable history information. <FIG> is a flowchart illustrating an example of the processing flow in the first analysis unit when the target period is selected from the variable history information. The processing flows of third analysis unit <NUM> and fourth analysis unit <NUM> when the target period is selected from variable history information <NUM> are the same as those of <FIG> and <FIG>, respectively. For this reason, the description of the processing flows of third analysis unit <NUM> and fourth analysis unit <NUM> will be omitted.

As illustrated in <FIG>, second analysis unit <NUM> displays the transition of the value of the variable indicated by variable history information <NUM> on display device <NUM> (step S121).

Subsequently, second analysis unit <NUM> receives the input of the designated period in the transitions of the values of the displayed variables (step S122). Second analysis unit <NUM> selects the input designated period as the target period (step S123).

Second analysis unit <NUM> extracts element <NUM> including the time information belonging to the target period (element <NUM> corresponding to the target period) from variable history information <NUM> (step S124). Second analysis unit <NUM> displays the value of the variable of extracted element <NUM> (the value of the variable corresponding to the target period) (step S125). That is, second analysis unit <NUM> displays the value of the variable corresponding to the target period in the display format different from the values of the variables corresponding to other periods. Alternatively, second analysis unit <NUM> may enlarge and display only the transition of the value of the variable corresponding to the target period.

Second analysis unit <NUM> outputs the target period information indicating the selected target period to first analysis unit <NUM> (step S126).

As illustrated in <FIG>, first analysis unit <NUM> generates line segment information <NUM> from locus information <NUM>, and displays the entire loci of tool <NUM> on display device <NUM> according to line segment information <NUM> (step S101).

First analysis unit <NUM> acquires the target period information from second analysis unit <NUM> (step S102). First analysis unit <NUM> extracts element <NUM> (element <NUM> corresponding to the target period) including the time information belonging to the target period indicated by the target period information from locus information <NUM> (step S103). First analysis unit <NUM> extracts line segment object ID corresponding to the end point and the block number which are matched with the tool point position information and the block number included in extracted element <NUM> from line segment information <NUM> (step S104). First analysis unit <NUM> highlights the line segment (that is, the first target portion) of line segment object ID extracted in step S104 (step S105).

Subsequently, first analysis unit <NUM> outputs the block number (target block number) of element <NUM> extracted in step S103 to third analysis unit <NUM> (step S1067).

As described above, control system <NUM> includes NC controller <NUM> that controls CNC machine tool <NUM> according to NC program <NUM>, sequence controller <NUM> that controls conveyance device <NUM> according to sequence program <NUM>, and support device <NUM>. NC controller <NUM> and sequence controller <NUM> are time-synchronized with each other. Support device <NUM> includes first analysis unit <NUM> and second analysis unit <NUM>. First analysis unit <NUM> acquires locus information <NUM> in which the position of tool <NUM> corresponding to instruction value <NUM> generated by the execution of NC program <NUM> is associated with the first time information indicating the control time using the instruction value by NC controller <NUM>. Second analysis unit <NUM> acquires variable history information <NUM> in which the value of the variable updated by the execution of sequence program <NUM> and the second time information indicating the update time are associated with each other. The first time information and the second time information are generated by NC controller <NUM> and sequence controller <NUM>, respectively. Support device <NUM> further includes the selection unit that selects the target period in the execution periods of NC program <NUM> and sequence program <NUM>. The selection unit is configured of input reception units <NUM>, <NUM> and target portion determination units <NUM>, <NUM>. Support device <NUM> includes drawing units <NUM>, <NUM>. Drawing unit <NUM> displays the first target portion corresponding to the target period among the loci indicated by locus information <NUM> on display device <NUM>. Drawing unit <NUM> displays the second target portion corresponding to the target period in the transition of the value of the variable indicated by variable history information <NUM> on display device <NUM>.

According to the above configuration, the first time information included in locus information <NUM> and the second time information included in variable history information <NUM> are generated by NC controller <NUM> and sequence controller <NUM> that are time-synchronized with each other. For this reason, the first time information and the second time information indicate the time on the common time axis. Accordingly, the designer can easily check the relationship between the operations of CNC machine tool <NUM> and conveyance device <NUM> in the target period by checking the first target portion of the locus corresponding to the target period and the value of the variable in the target period using display device <NUM>. As a result, the debugging efficiency of the NC program and the sequence program, which control the machine tool and the target instrument around the machine tool that operate in cooperation with each other, is improved.

Drawing unit <NUM> may display the locus indicated by locus information <NUM> on display device <NUM>. Input reception unit <NUM> and target portion determination unit <NUM> may receive the input of the designated section in the loci displayed on display device <NUM> and select the period corresponding to the designated section as the target period based on the locus information <NUM>. Drawing unit <NUM> displays the first target portion of the locus displayed on display device <NUM> in the display format different from the remaining portions.

Thus, the designer can designate the portion to be checked from the locus indicated by locus information <NUM> as the designated section. Because the period corresponding to the designated section is selected as the target period, the designated section is matched with the first target portion. The first target portion in the locus is displayed in the display format different from the remaining portion. Accordingly, the designer can easily check the relative position of the designated section (that is, the first target portion) with respect to the entire locus, and easily check the value of the variable updated in the period (target period) corresponding to the designated section.

Alternatively, drawing unit <NUM> may display the transition of the value of the variable indicated by variable history information <NUM> on display device <NUM>. Input reception unit <NUM> and target portion determination unit <NUM> may receive the input of the designated period in the transitions displayed on display device <NUM>, and select the designated period as the target period. Drawing unit <NUM> displays the second target portion corresponding to the target period in the transition displayed on display device <NUM> in the display format different from the remaining portion.

Accordingly, the designer can designate the period to be checked from the transition of the value of the variable indicated by variable history information <NUM> as the designated period. Because the designated period is selected as the target period, the portion in the locus corresponding to the designated period is the first target portion, and the first target portion is displayed on display device <NUM>. Consequently, the designer can easily check the relationship between the transition of the value of the variable and the position of CNC machine tool <NUM> in the designated period.

Support device <NUM> further includes drawing unit <NUM> that displays the source code of the third target portion of NC program <NUM> executed in the target period on display device <NUM>.

Accordingly, the designer can easily check the relationship between NC program <NUM> executed in the target period and the position of CNC machine tool <NUM> in the target period, and becomes easy to debug NC program <NUM>.

When support device <NUM> further includes drawing unit <NUM> that displays the source code of the fourth target portion related to the signal in sequence program <NUM> on display device <NUM> in response to the fact that the command outputting the signal to sequence controller <NUM> is included in the third target portion of NC program <NUM>.

Accordingly, the designer can easily check the source code of sequence program <NUM> related to the signal output according to NC program <NUM> in the target period, and becomes easy to debug sequence program <NUM>.

NC controller <NUM> and sequence controller <NUM> are included in one control device <NUM>, and operate according to common timer <NUM> included in control device <NUM>. Accordingly, NC controller <NUM> and sequence controller <NUM> can be easily time-synchronized.

In the above description, it is assumed that control device <NUM> includes sequence controller <NUM> and NC controller <NUM>. Accordingly, sequence controller <NUM> and NC controller <NUM> are time-synchronized using common timer <NUM>. However, NC controller <NUM> may be separate from control device <NUM>.

<FIG> is a schematic diagram illustrating control system <NUM> according to a first modification. In control system <NUM> of <FIG>, sequence controller <NUM> and NC controller <NUM> are independent devices and are connected to each other through the network. Sequence controller <NUM> and NC controller <NUM> have timers 101a, 101b that are time-synchronized with each other. Alternatively, sequence controller <NUM> and NC controller <NUM> may be time-synchronized with each other using, for example, time-sensitive networking (TSN) technology.

Because sequence controller <NUM> and NC controller <NUM> are time-synchronized with each other, the time information included in variable history information <NUM> generated by sequence controller <NUM> and the time information included in locus information <NUM> generated by NC controller <NUM> indicate the time on the same time axis. As a result, by selecting the target period, the designer can easily check the relationship between the portion corresponding to the target period in the locus indicated by locus information <NUM> and the portion corresponding to the target period in the transition of the value of the variable indicated by variable history information <NUM>.

In the above embodiment, in step S5 of <FIG>, first analysis unit <NUM> extracts element <NUM> having the same tool point position information and block number as the end point and block number corresponding to line segment object ID of the selected line segment from locus information <NUM>. The target period is selected based on extracted element <NUM>. However, in step S5, first analysis unit <NUM> may extract element <NUM> having the same block number as the block number corresponding to line segment object ID of the selected line segment from locus information <NUM>. Accordingly, the target period can be selected in units of lines (blocks) of NC program <NUM>.

Although the embodiment of the present invention have been described, it should be considered that the disclosed embodiment is an example in all respects and not restrictive. The scope of the present invention is indicated by the claims, and it is intended that all modifications within the meaning and scope of the claims are included in the present invention.

Claim 1:
A control system (<NUM>) comprising:
a first controller (<NUM>) configured to control a machine tool (<NUM>) according to an NC program (<NUM>);
a second controller (<NUM>) configured to control a target instrument (<NUM>) according to a sequence program (<NUM>); and
a support device (<NUM>),
wherein the first controller (<NUM>) and the second controller (<NUM>) are time-synchronized with each other,
the support device (<NUM>) includes:
a first acquisition unit (<NUM>) configured to acquire locus information (<NUM>) in which a position of the machine tool (<NUM>) corresponding to an instruction value generated by execution of the NC program (<NUM>) is associated with first time information indicating a control time using the instruction value by the first controller (<NUM>); and
a second acquisition unit (<NUM>) configured to acquire variable history information (<NUM>) in which a value of a variable updated by execution of the sequence program (<NUM>) is associated with second time information indicating an update time,
the first time information and the second time information being generated by the first controller (<NUM>) and the second controller (<NUM>), respectively,
the support device (<NUM>) further includes:
a selection unit (<NUM>, <NUM>, <NUM>, <NUM>) configured to select a target period from execution periods of the NC program (<NUM>) and the sequence program (<NUM>);
a first drawing unit (<NUM>) configured to display a locus indicated by the locus information (<NUM>) on a display device (<NUM>); and
a second drawing unit (<NUM>) configured to display transition of the value of the variable indicated by the variable history information (<NUM>) on the display device (<NUM>), wherein
the first drawing unit (<NUM>) is configured to display a first target portion corresponding to the target period in the locus displayed on the display device (<NUM>) in a display format different from a remaining portion, and
the second drawing unit (<NUM>) is configured to display only a second target portion corresponding to the target period in the transition on the display device (<NUM>) or display the second target portion in the transition displayed on the display device (<NUM>) in a display format different from a remaining portion.