WO2010134198A1 - Simulation apparatus and simulation program - Google Patents

Simulation apparatus and simulation program Download PDF

Info

Publication number
WO2010134198A1
WO2010134198A1 PCT/JP2009/059449 JP2009059449W WO2010134198A1 WO 2010134198 A1 WO2010134198 A1 WO 2010134198A1 JP 2009059449 W JP2009059449 W JP 2009059449W WO 2010134198 A1 WO2010134198 A1 WO 2010134198A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
motion
simulation
command value
sequence control
Prior art date
Application number
PCT/JP2009/059449
Other languages
French (fr)
Japanese (ja)
Inventor
鉄二 本並
美佐子 岡田
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2009/059449 priority Critical patent/WO2010134198A1/en
Publication of WO2010134198A1 publication Critical patent/WO2010134198A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0426Programming the control sequence
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/23Pc programming
    • G05B2219/23452Simulate sequence on display to control program, test functions
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24061Simulator, generates input signals, shows output signals of logic

Definitions

  • the present invention relates to a simulation apparatus and a simulation program for simulating control of a motion controller.
  • a motion controller for driving and controlling a motor that operates a controlled device.
  • the motion controller generates position command values and speed command values (hereinafter referred to as command values) based on a plurality of motion programs (servo programs) that are created in advance to achieve positioning, circular interpolation, constant speed control, etc. It is calculated at a fine calculation cycle, and the calculated command value is sequentially supplied to the servo amplifier that drives the motor.
  • the servo amplifier drives the motor based on the sequentially supplied command value, and sends the detection value by the position detector that detects the motor position and the speed detector that detects the speed to the motion controller as the execution result of the command value. To do.
  • the motion controller feeds back the received detected value of the motor when calculating the command value.
  • the programmable controller issues a command to the motion controller to start each of the plurality of motion programs in a predetermined order based on the sequence control program.
  • the programmable controller repeats the operation of issuing commands in this predetermined order in order to cause the controlled device to repeatedly execute the operation (in other words, to execute the cycle operation).
  • the motion controller starts the commanded motion program at the timing when the command is issued.
  • a sequence control program and a motion program are executed in a simulation mode, and a pseudo feedback that is a pseudo position detection value is calculated inside the motion controller without connecting a servo amplifier.
  • the calculated pseudo feedback is displayed on a general-purpose personal computer or the like. The user has verified the time required for one cycle of the cycle operation by executing the created sequence control program and motion program in the simulation mode.
  • Patent Document 1 discloses a technique for searching characteristics of a motor to be analyzed from a motor database and analyzing operation characteristics when the target motor is mounted on a predetermined device. .
  • Patent Document 1 relates to a physical simulation of hardware such as a motor, and differs from a technique related to simulation of so-called software processing that simulates a state of motion control of a motion controller. It is not technology that can solve the problem.
  • the present invention has been made in view of the above, and an object thereof is to obtain a simulation apparatus and a simulation program capable of executing a simulation of a motion program without preparing a sequence control program.
  • the present invention provides a simulation apparatus for simulating a plurality of motion programs related to cycle operation executed to calculate a command value supplied to a servo motor by a motion controller.
  • a program generating unit configured to generate a sequence control program for starting each of the motion programs based on a start timing set for each of the plurality of motion programs related to cycle operation, and the sequence generated by the program generating unit
  • Each of the motion programs is simulated based on a control program.
  • the simulation apparatus has an effect that a motion program can be simulated without preparing a sequence control program.
  • FIG. 1 is a diagram illustrating a functional configuration of a motion controller of an actual machine.
  • FIG. 2 is a diagram illustrating a functional configuration of the simulation apparatus according to the embodiment of the present invention.
  • FIG. 3 is a diagram illustrating an example of a motion program input screen.
  • FIG. 4 is a diagram illustrating an example of a setting condition input screen.
  • FIG. 5 is a diagram illustrating an example of a simulation result output screen.
  • FIG. 6 is a diagram illustrating an example of a generated sequence control program.
  • FIG. 7 is a diagram illustrating a hardware configuration of the simulation apparatus according to the embodiment of this invention.
  • FIG. 8 is a flowchart for explaining the operation for generating the sequence control program.
  • FIG. 1 is a diagram illustrating a functional configuration of a motion controller of an actual machine.
  • a motion controller 1 is connected to a servo amplifier 4 to which a motor 2 and a position detector 3 for detecting the position of the motor are connected, and a position detection value detected by the position detector 3 is fed back. Then, a position command value for positioning the motor 2 is calculated, and the calculated position command value is supplied to the servo amplifier 4.
  • a plurality of sets including the motor 2, the position detector 3, and the servo amplifier 4 (hereinafter referred to as “servo motor”) may be connected to the motion controller 1.
  • the motion controller 1 calculates a position command value to be supplied to the servo amplifier 4 by using the position detection value detected by the position detector 3 as feedback.
  • a speed detector that detects the detected value is provided, and the motion controller 1 may use the detected speed value as feedback. Further, the motion controller 1 calculates a speed command value using the speed detection value or the position detection value as feedback, and the servo amplifier 4 may drive the motor 2 based on the speed command value.
  • the motion controller 1 decodes and executes a user-created program 10 comprising a plurality of motion programs created by a user and a sequence control program for operating the programmable controller to start each of the plurality of motion programs, and the user-created program 10 And a motion control software processing unit 11 that calculates a position command value at a fine cycle (hereinafter referred to as a calculation cycle), and a servo amplifier I / F 12 that is a communication interface (I / F) with the servo amplifier 4. Yes.
  • the motion control software processing unit 11 internally supplies the calculated position command value to the servo amplifier 4 connected to the servo amplifier 4 via the servo amplifier I / F 12 and the calculated position command value to the servo amplifier 4. And a means for switching to a simulation mode, which is a mode for verifying execution of the user-created program 10. Specifically, the motion control software processing unit 11 uses the command calculation unit 13 that calculates the position command value and the position detection value that is the operation execution result of the calculated position command value by the servo motor without using the servo motor. When the simulation mode is set, the command calculation unit 13 transmits the calculated position command value transmission destination and the position command value of the position command value.
  • the transmission source of the position command value used as a feedback value for calculation is set as the pseudo feedback calculation unit 14.
  • the command calculation unit 13 transmits the calculated position command value to the servo amplifier 4 via the servo amplifier I / F 12, and the position detection value of the motor 2 is transmitted to the servo amplifier 4 and the servo. Obtained via the amplifier I / F 12.
  • the motion controller 1 further includes a communication interface (I / F) 15 with the general-purpose personal computer 5, and the general-purpose personal computer 5 is connected to the communication I / F 15 in the simulation mode. Then, the pseudo position detection value (pseudo feedback value) calculated by the pseudo feedback calculation unit 14 is transmitted to the general-purpose personal computer 5 via the communication I / F 15, and the transmitted position detection value is displayed on the display unit of the general-purpose personal computer 5. The waveform is displayed.
  • I / F communication interface
  • the user-created program 10 is executed in the simulation mode in the motion control software processing unit 11, and the operation of one cycle is observed by looking at the waveform of the pseudo feedback value displayed on the general-purpose personal computer 5.
  • the required time (cycle time) is verified.
  • the part necessary for executing the motion program of the sequence control program is automatically generated based on the setting of the start timing of the plurality of motion programs. It is the main feature.
  • sequence control program when expressed as a sequence control program, it is necessary to execute a motion program of this sequence control program, not a sequence control program operated by a programmable controller, unless otherwise specified. I will refer to the part.
  • sequence control program is sometimes referred to as an SFC (Sequential Function Chart) program.
  • FIG. 2 is a diagram for explaining the functional configuration of the simulation apparatus according to the embodiment of the present invention for realizing the above-described features.
  • the simulation apparatus 20 according to the embodiment of the present invention includes a motion control arithmetic processing unit 21, an SFC program generation processing unit 22, and an input / output processing unit 23.
  • the input / output processing unit 23 receives input of a motion program group D1 including a plurality of motion programs related to cycle operation created by the user and a setting condition D2. In the setting condition D2, the start timing of each motion program in the motion program group D1 and the target cycle time are set. The input / output processing unit 23 generates data for displaying the input screen of the motion program group D1, the input screen of the setting condition D2, and the output screen of the simulation result, and displays each screen on the display unit. .
  • FIG. 3 is a diagram showing an example of the input screen of the motion program group D1.
  • two motion programs are input in the input fields 31 and 32, respectively.
  • a number for identifying each motion program a motor axis number, a command type such as linear interpolation / circular interpolation, a target position corresponding to the command, an end point coordinate and a speed command Value is set.
  • the motion program K1 input to the input field 31 is an example of a program for executing incremental linear interpolation control using two axes.
  • the motion program K2 input in the input field 32 is a program example for executing the absolute position type circular interpolation control by two axes.
  • FIG. 4 is a diagram illustrating an example of an input screen for the setting condition D2.
  • a target cycle time that is a target in one-cycle operation is input to the input field 41, and an identification number of each motion program of the motion program group D1, that is, a motion program to be executed in one-cycle operation is input to the input field 42.
  • the start timing of the motion program K1 is input to the input field 43, and the start timing of the motion program K2 is input to the input field 44.
  • the motion program K1 is set to be executed in parallel (simultaneously) with K2.
  • the motion program K2 is set to be executed 10 seconds after the operation of the motion program K10 is completed.
  • the start timing of the motion program is set for all the motion programs input in the input field 42.
  • FIG. 5 is a diagram showing an example of a simulation result output screen.
  • the simulation result of the cycle operation of the motion program is displayed in the field 51 as a waveform.
  • the vertical axis is the speed of the motor 2 and the horizontal axis is the elapsed time, but the position detection value of the motor 2, that is, the pseudo feedback value may be the vertical axis.
  • the speed of the motor 2 is obtained by dividing the pseudo feedback value by the calculation cycle.
  • the position command value may be displayed on the vertical axis.
  • the speed command value obtained by dividing the difference between the position command values by the interval time of the calculation cycle may be displayed on the vertical axis.
  • the target cycle time is displayed in the field 52, and the cycle time obtained by the simulation is displayed in the field 53.
  • the input / output processing unit 23 does not need to display each of the above-described screens on the display unit at the same time, and displays and outputs the same number of screens according to the drawing capability of the display unit. Each screen may be switched as appropriate.
  • FIG. 6 is a diagram illustrating an example of the sequence control program D3 generated by the SFC program generation processing unit 22.
  • the sequence control program D3 generated by the SFC program generation processing unit 22 corresponds to a portion necessary for operating the motion program in the entire sequence control program executed by the programmable controller, and thus the programmable controller. Can be used as a base for creating the entire sequence control program to be executed.
  • the motion control calculation processing unit 21 performs a simulation (simulation) on the motion program included in the motion program group D1 based on the sequence control program D3 generated by the SFC program generation processing unit 22, and includes simulation result data and cycle time. Data D4 is output. More specifically, the motion control arithmetic processing unit 21 calculates a feedback value (pseudo feedback value) as a result of execution of the position command value by the virtual servo motor and the command calculation unit 26 that calculates the position command value.
  • the calculation cycle processing unit 25 including the pseudo feedback value calculation unit 27 and the motion programs included in the motion program group D1 are decoded in the order based on the sequence control program D3, and the calculation cycle processing unit 25 for each calculation cycle based on the decoding result.
  • a main processing unit 24 for sequentially calculating the position command value and the pseudo feedback value.
  • the motion control calculation processing unit 21 outputs the position command value and the pseudo feedback value as simulation result data for each calculation cycle in response to a command from the main processing unit 24.
  • the main processing unit 24 calculates the cycle time based on the pseudo feedback value included in the simulation result data, and outputs the calculated cycle time.
  • the main processing unit 24 may calculate the cycle time based on the position command value instead of the pseudo feedback value.
  • the input / output processing unit 23 may acquire the simulation result data output for each calculation cycle in real time and output the waveform on the simulation result output screen, or may periodically sample and output it. It may be.
  • FIG. 7 is a diagram for explaining the hardware configuration of the simulation apparatus 20.
  • the simulation apparatus 20 has a computer configuration of a general-purpose personal computer including a CPU (Central Processing Unit) 61, a ROM (Read Only Memory) 62, a RAM (Random Access Memory) 63, a display unit 64, and an input unit 65. .
  • the CPU 61, ROM 62, RAM 63, display unit 64, and input unit 65 are connected to each other via a bus line.
  • the CPU 61 executes a simulation program 66 that simulates the motion controller without requiring the user to input a sequence control program.
  • the display unit 64 is a display device such as a liquid crystal monitor, and displays output information for the user such as an operation screen (that is, each screen data generated by the input / output processing unit 23) based on an instruction from the CPU 61.
  • the input unit 65 includes a mouse and a keyboard, and inputs an operation of the simulation apparatus 20 from a user. The operation information input to the input unit 65 is sent to the CPU 61.
  • the simulation program 66 is stored in the ROM 62 and loaded into the RAM 63 via the bus line.
  • the CPU 61 executes a simulation program 66 loaded in the RAM 63. Specifically, in the simulation apparatus 20, the CPU 61 reads out the simulation program 66 from the ROM 62 and develops it in the program storage area in the RAM 63 in accordance with an instruction input from the input unit 65 by the user, and executes various processes.
  • the motion program group D1 and the setting condition D2 are input by the input unit 65. Note that the motion program group D1 and the setting condition D2 may be input via an external storage device by an operation of the input unit 65 by the user.
  • the CPU 61 executes various processes based on the input motion program group D1 and setting conditions D2, and a data storage area in which work data such as simulation result data and calculated cycle time generated in the various processes is formed in the RAM 63. Temporarily memorize it.
  • the CPU 61 outputs the generated sequence control program D3 to a program storage area in the RAM 63 or an external storage device.
  • the simulation program 66 may be stored in a storage device such as DISK.
  • the simulation program 66 may be loaded into a storage device such as DISK.
  • the simulation program 66 executed by the simulation apparatus 20 of the present embodiment includes the above-described units (motion control calculation processing unit 21, SFC program generation processing unit 22, and input / output processing unit 23).
  • the above units are loaded on the main storage device, and the motion control arithmetic processing unit 21, the SFC program generation processing unit 22, and the input / output processing unit 23 are generated on the main storage device.
  • the simulation program 66 executed by the simulation apparatus 20 of the present embodiment may be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network. Further, the simulation program 66 executed by the simulation apparatus 20 of the present embodiment may be configured to be provided or distributed via a network such as the Internet. Further, the simulation program 66 of the present embodiment may be configured to be incorporated in advance in a ROM or the like and provided to the simulation apparatus 20 of the present embodiment.
  • FIG. 8 is a flowchart for explaining the operation. Note that parts of the sequence control program to be generated are shown on the right side of the flowchart.
  • the SFC program generation processing unit 22 creates a parallel processing SFC program part so as to simultaneously start a plurality of motion programs set to operate in parallel under the setting condition D2 (step S1).
  • subjected is an example of a parallel processing SFC program part.
  • the parallel processing SFC program portion 71 three motion programs are operated in parallel.
  • the SFC program generation processing unit 22 creates a continuous SFC program part for starting (executing) the motion program after the operation of the other motion program is completed (step S2).
  • subjected is an example of a continuous SFC program part.
  • the SFC program generation processing unit 22 creates a conditional start SFC program part for starting the operation after the waiting condition is established (step S3), and the operation is ended.
  • the waiting condition is a predetermined condition after the operation of another motion program is completed, such as setting the start timing of the motion program K2 input in the input field 44 of the setting condition input screen shown in FIG. It is possible to set a condition for waiting until the time elapses or a condition for waiting until a predetermined device state satisfies a predetermined condition.
  • the user When setting a waiting condition related to the state of a predetermined device, the user creates a sequence control program for operating the predetermined device, and the created sequence is stored in the motion control arithmetic processing unit 21 during simulation.
  • the control program is operated separately from the sequence control program D3 generated by the SFC program generation processing unit 22.
  • subjected is an example of a conditional start SFC program part.
  • the SFC program generation processing unit 22 can generate the sequence control program D3 from the start timing set for each motion program in the setting condition D2.
  • the motion control arithmetic processing unit 21 simulates individual motion programs included in the motion program group D1 based on the sequence control program D3.
  • a sequence control program for starting each motion program is generated, Since each motion program is configured to be simulated based on the generated sequence control program, the motion program can be simulated without preparing the sequence control program.
  • the command calculation unit 26 has been described as calculating the position command value.
  • the assumed servo motor is a type that requires the speed command value as the command value
  • the speed command value is set. You may make it calculate.
  • the pseudo feedback calculation unit 27 calculates a speed detection value as a pseudo feedback value, and the command calculation unit 26 calculates. The command value may be calculated by feeding back the detected speed value.
  • the simulation apparatus and simulation program according to the present invention are suitable for application to a simulation apparatus and simulation program for simulating the control of a motion controller.

Abstract

Provided is a simulation apparatus for simulating motion programs concerning a cycle operation performed in order that a motion controller computes a command variable supplied to a servo motor. The simulation apparatus is characterized in that the apparatus includes a program generating means (22) for generating a sequence control program (D3) for starting motion programs concerning the cycle operation at start timings preset for the respective motion programs and that the motion programs are simulated by using the sequence control program (D3).

Description

シミュレーション装置およびシミュレーションプログラムSimulation apparatus and simulation program
 本発明は、モーションコントローラの制御をシミュレーションするシミュレーション装置およびシミュレーションプログラムに関する。 The present invention relates to a simulation apparatus and a simulation program for simulating control of a motion controller.
 一般的に、FAシステムにおいて、被制御装置を動作させるモータを駆動制御するためのモーションコントローラが使用される。モーションコントローラは、予め作成されている夫々位置決め、円弧補間、等速制御などを実現するための複数のモーションプログラム(サーボプログラム)に基づいて位置指令値や速度指令値(以下、指令値という)を細かい演算周期で算出し、算出した指令値をモータを駆動するサーボアンプに逐次供給する。サーボアンプは、逐次供給される指令値に基づいてモータを駆動し、モータの位置を検出する位置検出器や速度を検出する速度検出器による検出値を前記指令値の実行結果としてモーションコントローラに送信する。モーションコントローラは、指令値を算出する際、受信したモータの検出値をフィードバックする。 Generally, in an FA system, a motion controller for driving and controlling a motor that operates a controlled device is used. The motion controller generates position command values and speed command values (hereinafter referred to as command values) based on a plurality of motion programs (servo programs) that are created in advance to achieve positioning, circular interpolation, constant speed control, etc. It is calculated at a fine calculation cycle, and the calculated command value is sequentially supplied to the servo amplifier that drives the motor. The servo amplifier drives the motor based on the sequentially supplied command value, and sends the detection value by the position detector that detects the motor position and the speed detector that detects the speed to the motion controller as the execution result of the command value. To do. The motion controller feeds back the received detected value of the motor when calculating the command value.
 プログラマブルコントローラは、シーケンス制御プログラムに基づく所定の順番で複数のモーションプログラムの夫々を始動させる指令をモーションコントローラに発行する。プログラマブルコントローラは、被制御装置に繰り返し動作を実行させる(言い換えると、サイクル運転を実行させる)ために、この所定の順番で指令を発行する動作を繰り返す。モーションコントローラは、指令が発行されたタイミングで、指令されたモーションプログラムを始動させる。 The programmable controller issues a command to the motion controller to start each of the plurality of motion programs in a predetermined order based on the sequence control program. The programmable controller repeats the operation of issuing commands in this predetermined order in order to cause the controlled device to repeatedly execute the operation (in other words, to execute the cycle operation). The motion controller starts the commanded motion program at the timing when the command is issued.
 従来、モーションコントローラの実行デバッグを行う際、シーケンス制御プログラムとモーションプログラムとをシミュレーションモードで実行し、サーボアンプを接続せずにモーションコントローラ内部で擬似的な位置検出値である擬似フィードバックを算出する。シミュレーションモードでは、算出した擬似フィードバックを汎用パソコンなどに表示する。ユーザは、作成したシーケンス制御プログラムとモーションプログラムとをシミュレーションモードで実行することにより、前記したサイクル運転の1サイクルの動作にかかる所要時間を検証していた。 Conventionally, when performing execution debugging of a motion controller, a sequence control program and a motion program are executed in a simulation mode, and a pseudo feedback that is a pseudo position detection value is calculated inside the motion controller without connecting a servo amplifier. In the simulation mode, the calculated pseudo feedback is displayed on a general-purpose personal computer or the like. The user has verified the time required for one cycle of the cycle operation by executing the created sequence control program and motion program in the simulation mode.
 FA機器のシミュレーションに関連する技術としては、モータデータベースから解析対象モータの特性を検索し、対象モータが所定の装置に実装された場合の動作特性を解析する技術が特許文献1に開示されている。 As a technique related to simulation of FA equipment, Patent Document 1 discloses a technique for searching characteristics of a motor to be analyzed from a motor database and analyzing operation characteristics when the target motor is mounted on a predetermined device. .
特開平8-16548号公報JP-A-8-16548
 しかしながら、上記したモーションコントローラをシミュレーションモードで実行させる実行デバッグ方法によれば、ユーザはモーションプログラムだけでなくシーケンス制御プログラムまで用意する必要があり、実行デバッグに必要となる工数が多くなってしまう、という問題があった。 However, according to the execution debugging method of executing the motion controller described above in the simulation mode, the user needs to prepare not only the motion program but also the sequence control program, which increases the man-hours required for execution debugging. There was a problem.
 特許文献1の技術は、モータのようなハードウェアの物理シミュレーションに関するものであって、モーションコントローラのモーション制御の状態をシミュレーションする、いわゆるソフトウェア処理のシミュレーションに関する技術とは異なっており、上記した問題点を解決できる技術ではない。 The technique of Patent Document 1 relates to a physical simulation of hardware such as a motor, and differs from a technique related to simulation of so-called software processing that simulates a state of motion control of a motion controller. It is not technology that can solve the problem.
 本発明は、上記に鑑みてなされたものであって、シーケンス制御プログラムを用意することなくモーションプログラムのシミュレーションを実行することができるシミュレーション装置およびシミュレーションプログラムを得ることを目的とする。 The present invention has been made in view of the above, and an object thereof is to obtain a simulation apparatus and a simulation program capable of executing a simulation of a motion program without preparing a sequence control program.
 上述した課題を解決し、目的を達成するために、本発明は、モーションコントローラがサーボモータに供給する指令値を算出するために実行するサイクル運転に関する複数のモーションプログラムをシミュレーションするシミュレーション装置において、前記サイクル運転に関する複数のモーションプログラムの夫々に対して設定されている始動タイミングに基づいて、前記夫々のモーションプログラムを始動させるシーケンス制御プログラムを生成するプログラム生成手段を備え、前記プログラム生成手段が生成したシーケンス制御プログラムに基づいて前記夫々のモーションプログラムをシミュレーションする、ことを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention provides a simulation apparatus for simulating a plurality of motion programs related to cycle operation executed to calculate a command value supplied to a servo motor by a motion controller. A program generating unit configured to generate a sequence control program for starting each of the motion programs based on a start timing set for each of the plurality of motion programs related to cycle operation, and the sequence generated by the program generating unit Each of the motion programs is simulated based on a control program.
 本発明にかかるシミュレーション装置は、シーケンス制御プログラムを用意することなくモーションプログラムのシミュレーションを実行することができるという効果を奏する。 The simulation apparatus according to the present invention has an effect that a motion program can be simulated without preparing a sequence control program.
図1は、実機のモーションコントローラの機能構成を説明する図である。FIG. 1 is a diagram illustrating a functional configuration of a motion controller of an actual machine. 図2は、本発明の実施の形態のシミュレーション装置の機能構成を説明する図である。FIG. 2 is a diagram illustrating a functional configuration of the simulation apparatus according to the embodiment of the present invention. 図3は、モーションプログラム入力画面の一例を示す図である。FIG. 3 is a diagram illustrating an example of a motion program input screen. 図4は、設定条件入力画面の一例を示す図である。FIG. 4 is a diagram illustrating an example of a setting condition input screen. 図5は、シミュレーション結果出力画面の一例を示す図である。FIG. 5 is a diagram illustrating an example of a simulation result output screen. 図6は、生成されるシーケンス制御プログラムの一例を示す図である。FIG. 6 is a diagram illustrating an example of a generated sequence control program. 図7は、本発明の実施の形態のシミュレーション装置のハードウェア構成を説明する図である。FIG. 7 is a diagram illustrating a hardware configuration of the simulation apparatus according to the embodiment of this invention. 図8は、シーケンス制御プログラムを生成する動作を説明するフローチャートである。FIG. 8 is a flowchart for explaining the operation for generating the sequence control program.
 以下に、本発明にかかるシミュレーション装置およびシミュレーションプログラムの実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。 Hereinafter, embodiments of a simulation apparatus and a simulation program according to the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.
実施の形態.
 まず、理解を助けるために、実機のモーションコントローラについて説明する。図1は、実機のモーションコントローラの機能構成を説明する図である。
Embodiment.
First, to help understanding, we will explain the actual motion controller. FIG. 1 is a diagram illustrating a functional configuration of a motion controller of an actual machine.
 図1において、モーションコントローラ1は、モータ2と該モータの位置を検出する位置検出器3とが接続されたサーボアンプ4に接続されており、位置検出器3により検出された位置検出値をフィードバックしてモータ2の位置決めをする位置指令値を算出し、算出した位置指令値をサーボアンプ4に供給する。モータ2、位置検出器3およびサーボアンプ4からなるセット(以下、サーボモータという)は、モーションコントローラ1に複数個接続される場合もある。なお、ここでは、モーションコントローラ1は位置検出器3が検出した位置検出値をフィードバックとしてサーボアンプ4に供給する位置指令値を算出する、としているが、位置検出器3の代わりにモータ速度を速度検出値として検出する速度検出器を備え、モーションコントローラ1は速度検出値をフィードバックとして用いる場合もある。また、モーションコントローラ1は、速度検出値または位置検出値をフィードバックとして用いて速度指令値を算出し、サーボアンプ4は速度指令値に基づいてモータ2を駆動する場合もある。 In FIG. 1, a motion controller 1 is connected to a servo amplifier 4 to which a motor 2 and a position detector 3 for detecting the position of the motor are connected, and a position detection value detected by the position detector 3 is fed back. Then, a position command value for positioning the motor 2 is calculated, and the calculated position command value is supplied to the servo amplifier 4. A plurality of sets including the motor 2, the position detector 3, and the servo amplifier 4 (hereinafter referred to as “servo motor”) may be connected to the motion controller 1. Here, the motion controller 1 calculates a position command value to be supplied to the servo amplifier 4 by using the position detection value detected by the position detector 3 as feedback. A speed detector that detects the detected value is provided, and the motion controller 1 may use the detected speed value as feedback. Further, the motion controller 1 calculates a speed command value using the speed detection value or the position detection value as feedback, and the servo amplifier 4 may drive the motor 2 based on the speed command value.
 モーションコントローラ1は、ユーザが作成した複数のモーションプログラムとプログラマブルコントローラを動作させて前記複数のモーションプログラムの夫々を始動させるシーケンス制御プログラムとからなるユーザ作成プログラム10と、ユーザ作成プログラム10を解読・実行して細かい周期(以降、演算周期という)で位置指令値を算出するモーション制御ソフトウェア処理部11と、サーボアンプ4との通信インターフェース(I/F)であるサーボアンプI/F12と、を備えている。 The motion controller 1 decodes and executes a user-created program 10 comprising a plurality of motion programs created by a user and a sequence control program for operating the programmable controller to start each of the plurality of motion programs, and the user-created program 10 And a motion control software processing unit 11 that calculates a position command value at a fine cycle (hereinafter referred to as a calculation cycle), and a servo amplifier I / F 12 that is a communication interface (I / F) with the servo amplifier 4. Yes.
 モーション制御ソフトウェア処理部11は、内部に、算出した位置指令値をサーボアンプI/F12を介して接続されているサーボアンプ4に供給する通常運転モードと算出した位置指令値をサーボアンプ4に供給せずにユーザ作成プログラム10を実行検証するためのモードであるシミュレーションモードとを切り替える手段を有している。具体的には、モーション制御ソフトウェア処理部11は、位置指令値を算出する指令演算部13と、算出された位置指令値のサーボモータによる動作実行結果である位置検出値をサーボモータを用いずに算出する(即ち擬似的に算出する)擬似フィードバック算出部14と、を備えており、シミュレーションモードに設定されている場合、指令演算部13は、算出した位置指令値の送信先および位置指令値の算出のためのフィードバック値として用いる位置指令値の送信元を擬似フィードバック算出部14とする。一方、通常モードに設定されているとき、指令演算部13は、算出した位置指令値をサーボアンプI/F12を介してサーボアンプ4に伝達し、モータ2の位置検出値をサーボアンプ4およびサーボアンプI/F12を介して取得する。 The motion control software processing unit 11 internally supplies the calculated position command value to the servo amplifier 4 connected to the servo amplifier 4 via the servo amplifier I / F 12 and the calculated position command value to the servo amplifier 4. And a means for switching to a simulation mode, which is a mode for verifying execution of the user-created program 10. Specifically, the motion control software processing unit 11 uses the command calculation unit 13 that calculates the position command value and the position detection value that is the operation execution result of the calculated position command value by the servo motor without using the servo motor. When the simulation mode is set, the command calculation unit 13 transmits the calculated position command value transmission destination and the position command value of the position command value. The transmission source of the position command value used as a feedback value for calculation is set as the pseudo feedback calculation unit 14. On the other hand, when the normal mode is set, the command calculation unit 13 transmits the calculated position command value to the servo amplifier 4 via the servo amplifier I / F 12, and the position detection value of the motor 2 is transmitted to the servo amplifier 4 and the servo. Obtained via the amplifier I / F 12.
 モーションコントローラ1は、汎用パソコン5との通信インターフェース(I/F)15をさらに備えており、シミュレーションモード時においてはこの通信I/F15に汎用パソコン5が接続される。そして、擬似フィードバック算出部14が算出した擬似的な位置検出値(擬似フィードバック値)が通信I/F15を介して汎用パソコン5に送信され、送信された位置検出値が汎用パソコン5の表示部上に波形表示される。 The motion controller 1 further includes a communication interface (I / F) 15 with the general-purpose personal computer 5, and the general-purpose personal computer 5 is connected to the communication I / F 15 in the simulation mode. Then, the pseudo position detection value (pseudo feedback value) calculated by the pseudo feedback calculation unit 14 is transmitted to the general-purpose personal computer 5 via the communication I / F 15, and the transmitted position detection value is displayed on the display unit of the general-purpose personal computer 5. The waveform is displayed.
 ユーザは、モーションプログラムの実行デバッグを行う際、ユーザ作成プログラム10をモーション制御ソフトウェア処理部11においてシミュレーションモードで実行し、汎用パソコン5に表示された擬似フィードバック値の波形などをみて1サイクルの動作の所要時間(サイクルタイム)の検証を行う。このように、従来は、1サイクルの動作の検証を行う場合、ユーザは、モーションプログラムおよびシーケンス制御プログラムを作成しなければならなかった。これに対し、本実施の形態は、複数のモーションプログラムの始動タイミングの設定に基づいて、シーケンス制御プログラムのうちのモーションプログラムを実行するために必要となる部分を自動で生成するようにしたことが主たる特徴となっている。なお、以降の説明においては、シーケンス制御プログラムと表記した場合、特にことわりが無い限り、プログラマブルコントローラで動作させるシーケンス制御プログラムではなく、このシーケンス制御プログラムのうちのモーションプログラムを実行するために必要となる部分を指すこととする。また、シーケンス制御プログラムのことをSFC(Sequential Function Chart)プログラムということもある。 When the user debugs the execution of the motion program, the user-created program 10 is executed in the simulation mode in the motion control software processing unit 11, and the operation of one cycle is observed by looking at the waveform of the pseudo feedback value displayed on the general-purpose personal computer 5. The required time (cycle time) is verified. As described above, conventionally, when verifying the operation of one cycle, the user has to create a motion program and a sequence control program. On the other hand, in the present embodiment, the part necessary for executing the motion program of the sequence control program is automatically generated based on the setting of the start timing of the plurality of motion programs. It is the main feature. In the following description, when expressed as a sequence control program, it is necessary to execute a motion program of this sequence control program, not a sequence control program operated by a programmable controller, unless otherwise specified. I will refer to the part. In addition, the sequence control program is sometimes referred to as an SFC (Sequential Function Chart) program.
 図2は、前記説明した特徴を実現するための本発明の実施の形態のシミュレーション装置の機能構成を説明する図である。本発明の実施の形態のシミュレーション装置20は、モーション制御演算処理部21と、SFCプログラム生成処理部22と、入出力処理部23と、を備えている。 FIG. 2 is a diagram for explaining the functional configuration of the simulation apparatus according to the embodiment of the present invention for realizing the above-described features. The simulation apparatus 20 according to the embodiment of the present invention includes a motion control arithmetic processing unit 21, an SFC program generation processing unit 22, and an input / output processing unit 23.
 入出力処理部23は、ユーザが作成したサイクル運転に関する複数のモーションプログラムからなるモーションプログラム群D1および設定条件D2の入力を受け付ける。設定条件D2には、モーションプログラム群D1の夫々のモーションプログラムの始動タイミングと、目標サイクルタイムと、が設定されている。また、入出力処理部23は、モーションプログラム群D1の入力画面や、設定条件D2の入力画面や、シミュレーション結果の出力画面を表示するためのデータを生成し、表示部に夫々の画面を表示させる。 The input / output processing unit 23 receives input of a motion program group D1 including a plurality of motion programs related to cycle operation created by the user and a setting condition D2. In the setting condition D2, the start timing of each motion program in the motion program group D1 and the target cycle time are set. The input / output processing unit 23 generates data for displaying the input screen of the motion program group D1, the input screen of the setting condition D2, and the output screen of the simulation result, and displays each screen on the display unit. .
 図3は、モーションプログラム群D1の入力画面の一例を示す図である。図示するように、二つのモーションプログラムが夫々入力フィールド31、32に入力されている様子を示している。夫々の入力フィールド31、32では、夫々のモーションプログラムを識別するための番号と、モータの軸番号、直線補間/円弧補間などの命令の種類、命令に対応した目標位置、終点座標や速度指令の値が設定される。入力フィールド31に入力されているモーションプログラムK1は、2軸によるインクリメンタル方式の直線補間制御を実行するためのプログラム例である。また、入力フィールド32に入力されているモーションプログラムK2は、2軸による絶対位置方式の円弧補間制御を実行するためのプログラム例である。 FIG. 3 is a diagram showing an example of the input screen of the motion program group D1. As shown, two motion programs are input in the input fields 31 and 32, respectively. In each of the input fields 31 and 32, a number for identifying each motion program, a motor axis number, a command type such as linear interpolation / circular interpolation, a target position corresponding to the command, an end point coordinate and a speed command Value is set. The motion program K1 input to the input field 31 is an example of a program for executing incremental linear interpolation control using two axes. The motion program K2 input in the input field 32 is a program example for executing the absolute position type circular interpolation control by two axes.
 図4は、設定条件D2の入力画面の一例を示す図である。ここでは、1サイクル運転で目標とする目標サイクルタイムが入力フィールド41に入力され、1サイクル運転で実行させるモーションプログラム、すなわちモーションプログラム群D1の個々のモーションプログラムの識別番号が入力フィールド42に入力され、モーションプログラムK1の始動タイミングが入力フィールド43に入力され、モーションプログラムK2の始動タイミングが入力フィールド44に入力されている。ここでは、モーションプログラムK1は、K2と並列実行(同時実行)させるように設定されている。また、モーションプログラムK2は、モーションプログラムK10の動作を完了して10秒後に実行させるように設定されている。なお、ここでは表示していないが、モーションプログラムの始動タイミングは、入力フィールド42に入力された全てのモーションプログラムについて設定が行われる。 FIG. 4 is a diagram illustrating an example of an input screen for the setting condition D2. Here, a target cycle time that is a target in one-cycle operation is input to the input field 41, and an identification number of each motion program of the motion program group D1, that is, a motion program to be executed in one-cycle operation is input to the input field 42. The start timing of the motion program K1 is input to the input field 43, and the start timing of the motion program K2 is input to the input field 44. Here, the motion program K1 is set to be executed in parallel (simultaneously) with K2. The motion program K2 is set to be executed 10 seconds after the operation of the motion program K10 is completed. Although not shown here, the start timing of the motion program is set for all the motion programs input in the input field 42.
 図5は、シミュレーション結果の出力画面の一例を示す図である。図示するように、フィールド51にモーションプログラムをサイクル運転したシミュレーション結果が波形表示されている。なお、ここでは縦軸をモータ2の速度、横軸を経過時間としているが、モータ2の位置検出値、すなわち擬似フィードバック値を縦軸とするようにしてもよい。モータ2の速度は、擬似フィードバック値を演算周期で除算することにより得られる。また、位置指令値を縦軸に表示するようにしてもよい。さらに、位置指令値の差分を演算周期の間隔時間で除算して得られる速度指令値を縦軸に表示するようにしてもよい。フィールド52には目標サイクルタイム、フィールド53には、シミュレーションにより得られたサイクルタイムが表示されている。 FIG. 5 is a diagram showing an example of a simulation result output screen. As shown in the figure, the simulation result of the cycle operation of the motion program is displayed in the field 51 as a waveform. Here, the vertical axis is the speed of the motor 2 and the horizontal axis is the elapsed time, but the position detection value of the motor 2, that is, the pseudo feedback value may be the vertical axis. The speed of the motor 2 is obtained by dividing the pseudo feedback value by the calculation cycle. Further, the position command value may be displayed on the vertical axis. Further, the speed command value obtained by dividing the difference between the position command values by the interval time of the calculation cycle may be displayed on the vertical axis. The target cycle time is displayed in the field 52, and the cycle time obtained by the simulation is displayed in the field 53.
 なお、入出力処理部23は、以上に示した夫々の画面を表示部に一度に表示させるようにする必要はなく、表示部の描画能力にあわせた数だけ表示出力させ、ユーザからの入力に応じて適宜夫々の画面を切り替えるようにしてよい。 Note that the input / output processing unit 23 does not need to display each of the above-described screens on the display unit at the same time, and displays and outputs the same number of screens according to the drawing capability of the display unit. Each screen may be switched as appropriate.
 図2に戻り、SFCプログラム生成処理部22は、入力された設定条件D2に基づいてシーケンス制御プログラム(SFCプログラム)D3を生成する。図6は、SFCプログラム生成処理部22が生成するシーケンス制御プログラムD3の一例を説明する図である。図示するように、サイクル運転が開始されると、モーションプログラムK1が始動され、モーションプログラムK1の動作が完了すると、モーションプログラムK2、K3、およびK4が同時に起動されるようになっている。なお、SFCプログラム生成処理部22が生成するシーケンス制御プログラムD3は、プログラマブルコントローラが実行するシーケンス制御プログラム全体のうちのモーションプログラムを動作させるために必要となる部分に該当するものであるため、プログラマブルコントローラで実行する全体のシーケンス制御プログラムを作成する際のベースとして使用することができる。 2, the SFC program generation processing unit 22 generates a sequence control program (SFC program) D3 based on the input setting condition D2. FIG. 6 is a diagram illustrating an example of the sequence control program D3 generated by the SFC program generation processing unit 22. As shown in the figure, when the cycle operation is started, the motion program K1 is started, and when the operation of the motion program K1 is completed, the motion programs K2, K3, and K4 are started simultaneously. Note that the sequence control program D3 generated by the SFC program generation processing unit 22 corresponds to a portion necessary for operating the motion program in the entire sequence control program executed by the programmable controller, and thus the programmable controller. Can be used as a base for creating the entire sequence control program to be executed.
 モーション制御演算処理部21は、モーションプログラム群D1が含むモーションプログラムをSFCプログラム生成処理部22が生成したシーケンス制御プログラムD3に基づいて擬似的に実行(シミュレーション)し、シミュレーション結果データおよびサイクルタイムを含むデータD4を出力する。より具体的には、モーション制御演算処理部21は、位置指令値を算出する指令演算部26およびこの位置指令値の仮想的なサーボモータによる実行結果としてのフィードバック値(擬似フィードバック値)を算出する擬似フィードバック値算出部27を備える演算周期処理部25と、モーションプログラム群D1に含まれるモーションプログラムをシーケンス制御プログラムD3に基づく順番で解読し、解読結果に基づいて演算周期毎に演算周期処理部25を呼び出し、位置指令値および擬似フィードバック値を逐次算出させるメイン処理部24と、を備える。モーション制御演算処理部21は、メイン処理部24の指令により、位置指令値および擬似フィードバック値をシミュレーション結果データとして演算周期毎に出力する。メイン処理部24は、シミュレーション結果データに含まれる擬似フィードバック値に基づいてサイクルタイムを算出し、算出したサイクルタイムを出力する。ここで、メイン処理部24は、擬似フィードバック値の代わりに位置指令値に基づいてサイクルタイムを算出してもよい。 The motion control calculation processing unit 21 performs a simulation (simulation) on the motion program included in the motion program group D1 based on the sequence control program D3 generated by the SFC program generation processing unit 22, and includes simulation result data and cycle time. Data D4 is output. More specifically, the motion control arithmetic processing unit 21 calculates a feedback value (pseudo feedback value) as a result of execution of the position command value by the virtual servo motor and the command calculation unit 26 that calculates the position command value. The calculation cycle processing unit 25 including the pseudo feedback value calculation unit 27 and the motion programs included in the motion program group D1 are decoded in the order based on the sequence control program D3, and the calculation cycle processing unit 25 for each calculation cycle based on the decoding result. And a main processing unit 24 for sequentially calculating the position command value and the pseudo feedback value. The motion control calculation processing unit 21 outputs the position command value and the pseudo feedback value as simulation result data for each calculation cycle in response to a command from the main processing unit 24. The main processing unit 24 calculates the cycle time based on the pseudo feedback value included in the simulation result data, and outputs the calculated cycle time. Here, the main processing unit 24 may calculate the cycle time based on the position command value instead of the pseudo feedback value.
 なお、入出力処理部23は、シミュレーション結果出力画面に、演算周期毎に出力されるシミュレーション結果データをリアルタイムに取得して波形出力するようにしてもよいし、定期的にサンプリングして出力するようにしてもよい。 The input / output processing unit 23 may acquire the simulation result data output for each calculation cycle in real time and output the waveform on the simulation result output screen, or may periodically sample and output it. It may be.
 図7は、シミュレーション装置20のハードウェア構成を説明する図である。シミュレーション装置20は、CPU(Central Processing Unit)61、ROM(Read Only Memory)62、RAM(Random Access Memory)63、表示部64、入力部65を備える、通常の汎用パソコンのコンピュータ構成となっている。CPU61、ROM62、RAM63、表示部64、入力部65は、バスラインを介して夫々接続されている。 FIG. 7 is a diagram for explaining the hardware configuration of the simulation apparatus 20. The simulation apparatus 20 has a computer configuration of a general-purpose personal computer including a CPU (Central Processing Unit) 61, a ROM (Read Only Memory) 62, a RAM (Random Access Memory) 63, a display unit 64, and an input unit 65. . The CPU 61, ROM 62, RAM 63, display unit 64, and input unit 65 are connected to each other via a bus line.
 CPU61は、ユーザによるシーケンス制御プログラムの入力を必要とすることなくモーションコントローラをシミュレーションするシミュレーションプログラム66を実行する。表示部64は、液晶モニタなどの表示装置であり、CPU61からの指示に基づいて、操作画面などのユーザに対する出力情報(すなわち入出力処理部23が生成する夫々の画面データ)を表示する。入力部65は、マウスやキーボードを備えて構成され、ユーザからのシミュレーション装置20の操作が入力される。入力部65へ入力された操作情報は、CPU61へ送られる。 The CPU 61 executes a simulation program 66 that simulates the motion controller without requiring the user to input a sequence control program. The display unit 64 is a display device such as a liquid crystal monitor, and displays output information for the user such as an operation screen (that is, each screen data generated by the input / output processing unit 23) based on an instruction from the CPU 61. The input unit 65 includes a mouse and a keyboard, and inputs an operation of the simulation apparatus 20 from a user. The operation information input to the input unit 65 is sent to the CPU 61.
 シミュレーションプログラム66は、ROM62内に格納されており、バスラインを介してRAM63へロードされる。CPU61はRAM63内にロードされたシミュレーションプログラム66を実行する。具体的には、シミュレーション装置20では、ユーザによる入力部65からの指示入力に従って、CPU61がROM62内からシミュレーションプログラム66を読み出してRAM63内のプログラム格納領域に展開して各種処理を実行する。モーションプログラム群D1や設定条件D2は、入力部65により入力される。なお、モーションプログラム群D1や設定条件D2は、ユーザによる入力部65の操作により外部記憶装置を介して入力されるようにしてもよい。CPU61は、入力されたモーションプログラム群D1や設定条件D2に基づいて各種処理を実行し、この各種処理に際して生じるシミュレーション結果データや算出されたサイクルタイムなどワークデータをRAM63内に形成されるデータ格納領域に一時的に記憶させておく。CPU61は、生成したシーケンス制御プログラムD3をRAM63内のプログラム格納領域あるいは外部記憶装置などに出力する。なお、シミュレーションプログラム66は、DISKなどの記憶装置に格納しておいてもよい。また、シミュレーションプログラム66は、DISKなどの記憶装置にロードしてもよい。 The simulation program 66 is stored in the ROM 62 and loaded into the RAM 63 via the bus line. The CPU 61 executes a simulation program 66 loaded in the RAM 63. Specifically, in the simulation apparatus 20, the CPU 61 reads out the simulation program 66 from the ROM 62 and develops it in the program storage area in the RAM 63 in accordance with an instruction input from the input unit 65 by the user, and executes various processes. The motion program group D1 and the setting condition D2 are input by the input unit 65. Note that the motion program group D1 and the setting condition D2 may be input via an external storage device by an operation of the input unit 65 by the user. The CPU 61 executes various processes based on the input motion program group D1 and setting conditions D2, and a data storage area in which work data such as simulation result data and calculated cycle time generated in the various processes is formed in the RAM 63. Temporarily memorize it. The CPU 61 outputs the generated sequence control program D3 to a program storage area in the RAM 63 or an external storage device. The simulation program 66 may be stored in a storage device such as DISK. The simulation program 66 may be loaded into a storage device such as DISK.
 本実施の形態のシミュレーション装置20で実行されるシミュレーションプログラム66は、前述の各部(モーション制御演算処理部21、SFCプログラム生成処理部22、および入出力処理部23)を含む構成となっており、上記各部が主記憶装置上にロードされ、モーション制御演算処理部21、SFCプログラム生成処理部22、および入出力処理部23が主記憶装置上に生成される。 The simulation program 66 executed by the simulation apparatus 20 of the present embodiment includes the above-described units (motion control calculation processing unit 21, SFC program generation processing unit 22, and input / output processing unit 23). The above units are loaded on the main storage device, and the motion control arithmetic processing unit 21, the SFC program generation processing unit 22, and the input / output processing unit 23 are generated on the main storage device.
 なお、本実施の形態のシミュレーション装置20で実行されるシミュレーションプログラム66を、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成しても良い。また、本実施の形態のシミュレーション装置20で実行されるシミュレーションプログラム66をインターネット等のネットワーク経由で提供または配布するように構成してもよい。また、本実施の形態のシミュレーションプログラム66を、ROM等に予め組み込んで本実施の形態のシミュレーション装置20に提供するように構成してもよい。 It should be noted that the simulation program 66 executed by the simulation apparatus 20 of the present embodiment may be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network. Further, the simulation program 66 executed by the simulation apparatus 20 of the present embodiment may be configured to be provided or distributed via a network such as the Internet. Further, the simulation program 66 of the present embodiment may be configured to be incorporated in advance in a ROM or the like and provided to the simulation apparatus 20 of the present embodiment.
 次に、本実施の形態のシミュレーション装置20がシーケンス制御プログラムD3を生成する動作を説明する。図8は、該動作を説明するフローチャートである。なお、フローチャートの右に、生成されるシーケンス制御プログラムのパーツを示している。 Next, an operation in which the simulation apparatus 20 according to the present embodiment generates the sequence control program D3 will be described. FIG. 8 is a flowchart for explaining the operation. Note that parts of the sequence control program to be generated are shown on the right side of the flowchart.
 まず、SFCプログラム生成処理部22は、設定条件D2において並列動作するように設定されている複数のモーションプログラムを同時に始動するように、並列処理SFCプログラム部分を作成する(ステップS1)。ステップS1の処理フローの右に示す符号71が付されている図は、並列処理SFCプログラム部分の一例である。並列処理SFCプログラム部分71によれば、3つのモーションプログラムが並列動作するようになっている。 First, the SFC program generation processing unit 22 creates a parallel processing SFC program part so as to simultaneously start a plurality of motion programs set to operate in parallel under the setting condition D2 (step S1). The figure to which the code | symbol 71 shown on the right of the processing flow of step S1 is attached | subjected is an example of a parallel processing SFC program part. According to the parallel processing SFC program portion 71, three motion programs are operated in parallel.
 次に、SFCプログラム生成処理部22は、他のモーションプログラムの動作が完了後にモーションプログラムを始動する(実行する)ための連続SFCプログラム部分を作成する(ステップS2)。ステップS2の処理フローの右に示す符号72が付されている図は、連続SFCプログラム部分の一例である。 Next, the SFC program generation processing unit 22 creates a continuous SFC program part for starting (executing) the motion program after the operation of the other motion program is completed (step S2). The figure to which the code | symbol 72 shown on the right of the processing flow of step S2 is attached | subjected is an example of a continuous SFC program part.
 そして、SFCプログラム生成処理部22は、待ち条件が成立した後に動作を始動させるための条件的始動SFCプログラム部分を作成し(ステップS3)、動作が終了となる。なお、待ち条件としは、例えば図4に示した設定条件入力画面の入力フィールド44に入力されているモーションプログラムK2の始動タイミングの設定のように、他のモーションプログラムの動作が終了してから所定の時間が経過するのを待つ条件や、所定のデバイスの状態が所定の条件を満たすまで待つ条件を設定することができる。なお、所定のデバイスの状態に関する待ち条件を設定する場合、ユーザは、前記所定のデバイスを操作するためのシーケンス制御プログラムを作成し、シミュレーション時においては、モーション制御演算処理部21に前記作成したシーケンス制御プログラムをSFCプログラム生成処理部22が生成したシーケンス制御プログラムD3とは別に動作させるようにする。ステップS3の右に示す符号73が付された図は、条件的始動SFCプログラム部分の一例である。 Then, the SFC program generation processing unit 22 creates a conditional start SFC program part for starting the operation after the waiting condition is established (step S3), and the operation is ended. Note that the waiting condition is a predetermined condition after the operation of another motion program is completed, such as setting the start timing of the motion program K2 input in the input field 44 of the setting condition input screen shown in FIG. It is possible to set a condition for waiting until the time elapses or a condition for waiting until a predetermined device state satisfies a predetermined condition. When setting a waiting condition related to the state of a predetermined device, the user creates a sequence control program for operating the predetermined device, and the created sequence is stored in the motion control arithmetic processing unit 21 during simulation. The control program is operated separately from the sequence control program D3 generated by the SFC program generation processing unit 22. The figure to which the code | symbol 73 shown to the right of step S3 was attached | subjected is an example of a conditional start SFC program part.
 以上の動作により、SFCプログラム生成処理部22は、設定条件D2にモーションプログラム毎に設定されている始動タイミングからシーケンス制御プログラムD3を生成することができる。モーション制御演算処理部21は、シーケンス制御プログラムD3に基づいてモーションプログラム群D1が含む個々のモーションプログラムをシミュレーションする。 By the above operation, the SFC program generation processing unit 22 can generate the sequence control program D3 from the start timing set for each motion program in the setting condition D2. The motion control arithmetic processing unit 21 simulates individual motion programs included in the motion program group D1 based on the sequence control program D3.
 以上述べたように、本実施の形態によれば、サイクル運転に関する複数のモーションプログラムの夫々に対して設定されている始動タイミングに基づいて、夫々のモーションプログラムを始動させるシーケンス制御プログラムを生成し、生成したシーケンス制御プログラムに基づいて夫々のモーションプログラムをシミュレーションするように構成したので、シーケンス制御プログラムを用意することなくモーションプログラムのシミュレーションを実行することができるようになる。 As described above, according to the present embodiment, based on the start timing set for each of a plurality of motion programs related to cycle operation, a sequence control program for starting each motion program is generated, Since each motion program is configured to be simulated based on the generated sequence control program, the motion program can be simulated without preparing the sequence control program.
 ところで、本実施の形態では、指令演算部26は位置指令値を算出するとして説明したが、想定しているサーボモータが速度指令値を指令値として必要とするタイプである場合、速度指令値を算出するようにしてもよい。また、擬似フィードバック算出部27は、想定しているサーボモータが位置検出器3の代わりに速度検出器を有する場合、擬似フィードバック値として速度検出値を算出するようにし、指令演算部26は算出された速度検出値をフィードバックして指令値を算出するようにしてもよい。 In the present embodiment, the command calculation unit 26 has been described as calculating the position command value. However, when the assumed servo motor is a type that requires the speed command value as the command value, the speed command value is set. You may make it calculate. Further, when the assumed servo motor has a speed detector instead of the position detector 3, the pseudo feedback calculation unit 27 calculates a speed detection value as a pseudo feedback value, and the command calculation unit 26 calculates. The command value may be calculated by feeding back the detected speed value.
 以上のように、本発明にかかるシミュレーション装置およびシミュレーションプログラムは、モーションコントローラの制御をシミュレーションするシミュレーション装置およびシミュレーションプログラムに適用して好適である。 As described above, the simulation apparatus and simulation program according to the present invention are suitable for application to a simulation apparatus and simulation program for simulating the control of a motion controller.
1 モーションコントローラ
2 モータ
3 位置検出器
4 サーボアンプ
5 汎用パソコン
10 ユーザ作成プログラム
11 モーション制御ソフトウェア処理部
12 サーボアンプI/F
13 指令演算部
14 擬似フィードバック算出部
15 通信I/F
20 シミュレーション装置
21 モーション制御演算処理部
22 SFCプログラム生成処理部
23 入出力処理部
24 メイン処理部
25 演算周期処理部
26 指令演算部
27 擬似フィードバック値算出部
31、32、41~44 入力フィールド
51~53 フィールド
61 CPU
62 ROM
63 RAM
64 表示部
65 入力部
66 シミュレーションプログラム
71~73 SFCプログラム部分
DESCRIPTION OF SYMBOLS 1 Motion controller 2 Motor 3 Position detector 4 Servo amplifier 5 General-purpose personal computer 10 User creation program 11 Motion control software processing part 12 Servo amplifier I / F
13 Command Calculation Unit 14 Pseudo Feedback Calculation Unit 15 Communication I / F
20 Simulation device 21 Motion control calculation processing unit 22 SFC program generation processing unit 23 Input / output processing unit 24 Main processing unit 25 Calculation cycle processing unit 26 Command calculation unit 27 Pseudo feedback value calculation units 31, 32, 41 to 44 Input fields 51 to 53 Field 61 CPU
62 ROM
63 RAM
64 Display unit 65 Input unit 66 Simulation program 71 to 73 SFC program part

Claims (4)

  1.  モーションコントローラがサーボモータに供給する指令値を算出するために実行するサイクル運転に関する複数のモーションプログラムをシミュレーションするシミュレーション装置において、
     前記サイクル運転に関する複数のモーションプログラムの夫々に対して設定されている始動タイミングに基づいて、前記夫々のモーションプログラムを始動させるシーケンス制御プログラムを生成するプログラム生成手段を備え、
     前記プログラム生成手段が生成したシーケンス制御プログラムに基づいて前記夫々のモーションプログラムをシミュレーションする、ことを特徴とするシミュレーション装置。
    In a simulation device that simulates a plurality of motion programs related to cycle operation executed to calculate a command value supplied to a servo motor by a motion controller,
    Program generation means for generating a sequence control program for starting each of the motion programs based on a start timing set for each of the plurality of motion programs related to the cycle operation,
    A simulation apparatus characterized by simulating each of the motion programs based on a sequence control program generated by the program generation means.
  2.  前記シミュレーションは、前記サーボモータに供給する指令値およびこの指令値の前記サーボモータによる実行結果としてのフィードバック値を指令周期毎に算出することである、ことを特徴とする請求項1に記載のシミュレーション装置。 The simulation according to claim 1, wherein the simulation is to calculate a command value supplied to the servomotor and a feedback value as a result of execution of the command value by the servomotor for each command cycle. apparatus.
  3.  前記指令値は、位置指令値または速度指令値であって、前記フィードバック値は、位置検出値または速度検出値である、ことを特徴とする請求項2に記載のシミュレーション装置。 3. The simulation apparatus according to claim 2, wherein the command value is a position command value or a speed command value, and the feedback value is a position detection value or a speed detection value.
  4.  モーションコントローラがサーボモータに供給する指令値を算出するために実行するサイクル運転に関する複数のモーションプログラムのシミュレーションをコンピュータに実行させるシミュレーションプログラムにおいて、
     コンピュータに、
     前記サイクル運転に関する複数のモーションプログラムの夫々に対して設定されている始動タイミングに基づいて、前記夫々のモーションプログラムを始動させるシーケンス制御プログラムを生成する手順と、
     前記生成したシーケンス制御プログラムに基づいて前記夫々のモーションプログラムをシミュレーションする手順と、
     を実行させることを特徴とするシミュレーションプログラム。
    In a simulation program that causes a computer to execute a simulation of a plurality of motion programs related to cycle operation executed to calculate a command value supplied to a servo motor by a motion controller,
    On the computer,
    Generating a sequence control program for starting each of the motion programs based on the start timing set for each of the plurality of motion programs related to the cycle operation;
    A procedure for simulating the respective motion programs based on the generated sequence control program;
    A simulation program characterized by executing
PCT/JP2009/059449 2009-05-22 2009-05-22 Simulation apparatus and simulation program WO2010134198A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2009/059449 WO2010134198A1 (en) 2009-05-22 2009-05-22 Simulation apparatus and simulation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2009/059449 WO2010134198A1 (en) 2009-05-22 2009-05-22 Simulation apparatus and simulation program

Publications (1)

Publication Number Publication Date
WO2010134198A1 true WO2010134198A1 (en) 2010-11-25

Family

ID=43125894

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/059449 WO2010134198A1 (en) 2009-05-22 2009-05-22 Simulation apparatus and simulation program

Country Status (1)

Country Link
WO (1) WO2010134198A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103339573A (en) * 2011-01-31 2013-10-02 三菱电机株式会社 Motion SFC program component creation device
CN103649856A (en) * 2011-06-24 2014-03-19 三菱电机株式会社 Method for simulating machining of objects by motion of tool and system and computer program product therefor
JP6081018B1 (en) * 2015-04-23 2017-02-15 三菱電機株式会社 Positioning control device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003288113A (en) * 2002-03-27 2003-10-10 Toyoda Mach Works Ltd Simulation method of equipment and simulation program of equipment
JP2006343818A (en) * 2005-06-07 2006-12-21 Idec Corp Debug method of program for teaching device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003288113A (en) * 2002-03-27 2003-10-10 Toyoda Mach Works Ltd Simulation method of equipment and simulation program of equipment
JP2006343818A (en) * 2005-06-07 2006-12-21 Idec Corp Debug method of program for teaching device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103339573A (en) * 2011-01-31 2013-10-02 三菱电机株式会社 Motion SFC program component creation device
CN103339573B (en) * 2011-01-31 2015-12-16 三菱电机株式会社 Motion sfc program component creation device
CN103649856A (en) * 2011-06-24 2014-03-19 三菱电机株式会社 Method for simulating machining of objects by motion of tool and system and computer program product therefor
JP6081018B1 (en) * 2015-04-23 2017-02-15 三菱電機株式会社 Positioning control device
US10437226B2 (en) 2015-04-23 2019-10-08 Mitsubishi Electric Corporation Positioning control apparatus

Similar Documents

Publication Publication Date Title
US7194396B2 (en) Simulation device
EP2849006B1 (en) Control system simulation system and method
US10025286B2 (en) Simulation system, programmable controller, simulation device, and engineering tool
JP6950347B2 (en) Information processing equipment, information processing methods and programs
US7174225B2 (en) Method and system for simulating processing of a workpiece with a machine tool
US9836559B2 (en) Simulation apparatus, simulation method, and simulation program
JP2011192016A (en) Controller support device, simulation method of control program, support program of controller and computer-readable storage medium storing support program of controller
US10761513B2 (en) Information processing device, information processing method, and non-transitory computer-readable recording medium
JP2016012191A (en) Information processing device, information processing method, and program
WO2013136918A9 (en) Information processing apparatus, simulation method, and program
JP2014144524A (en) Simulation system that performs simulation according to robot program
US10814486B2 (en) Information processing device, information processing method, and non-transitory computer-readable recording medium
JP5891891B2 (en) Information processing apparatus, information processing method, and program
WO2010134198A1 (en) Simulation apparatus and simulation program
US11467569B2 (en) Simulation device
JP2004259112A (en) Evaluation system, evaluation method, and motion controller
KR101706029B1 (en) System-setup assistance apparatus
JP2008242572A (en) Control processing simulation device
JP2018036945A (en) Simulator linkage device, control method of simulator linkage device, information processing program, and record medium
KR20120108425A (en) Simulation apparatus for repair
JP2019174967A (en) Integrated simulation system with improved operability
JP2008165324A (en) Program creation support device
WO2010134199A1 (en) Simulation apparatus and simulation program
JP2009048396A (en) Simulator of motor motion
TW201629655A (en) Open simulation system of 3D machine tools and method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09844930

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09844930

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP