JP6500594B2 - Control program editor - Google Patents

Control program editor Download PDF

Info

Publication number
JP6500594B2
JP6500594B2 JP2015102678A JP2015102678A JP6500594B2 JP 6500594 B2 JP6500594 B2 JP 6500594B2 JP 2015102678 A JP2015102678 A JP 2015102678A JP 2015102678 A JP2015102678 A JP 2015102678A JP 6500594 B2 JP6500594 B2 JP 6500594B2
Authority
JP
Japan
Prior art keywords
program
transition
control program
steps
control
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2015102678A
Other languages
Japanese (ja)
Other versions
JP2016218724A (en
Inventor
清水 昭宏
昭宏 清水
輝一 千田
輝一 千田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JTEKT Corp
Original Assignee
JTEKT Corp
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 JTEKT Corp filed Critical JTEKT Corp
Priority to JP2015102678A priority Critical patent/JP6500594B2/en
Publication of JP2016218724A publication Critical patent/JP2016218724A/en
Application granted granted Critical
Publication of JP6500594B2 publication Critical patent/JP6500594B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

本発明は、制御対象機器を制御するプログラマブルコントローラで実行可能な制御プログラムを編集するための制御プログラムの編集装置に関する。   The present invention relates to a control program editing apparatus for editing a control program executable by a programmable controller that controls a control target device.

従来、制御対象機器の動作単位毎に設けられる複数のステップ、及び複数のステップ間の遷移条件を示す複数のトランジションを含むシーケンシャル・ファンクション・チャート式プログラム(以下、「チャート式プログラム」という)と、複数のステップの具体的な動作内容、及びトランジションの遷移条件を複数の接点及びコイルを含む回路要素によって表したラダープログラムとを有する制御プログラムに従って、制御対象機器を制御するプログラマブルコントローラが知られている(例えば、特許文献1参照)。   Conventionally, a sequential function chart program (hereinafter referred to as a "chart program") including a plurality of steps provided for each operation unit of a control target device and a plurality of transitions indicating transition conditions between the plurality of steps; A programmable controller is known which controls a control target device according to a control program having specific operation contents of a plurality of steps and a ladder program representing a transition condition of a transition by a plurality of contacts and a circuit element including a coil. (See, for example, Patent Document 1).

チャート式プログラム、及びラダープログラムは、それぞれIEC61131−3規格において、SFC言語、及びラダー言語として定義されている。チャート式プログラムは、個別の動作単位の動作順序をフローチャートのように記述する形式であり、例えば制御プログラムがラダープログラムのみによって記述された場合に比較して、制御対象機器の動作の流れを容易に把握することが可能である。   The chart type program and the ladder program are defined as SFC language and ladder language in the IEC 61131-3 standard, respectively. The chart type program is a format that describes the operation order of individual operation units as a flow chart, and for example, facilitates the flow of operation of the control target device compared to the case where the control program is described only by the ladder program. It is possible to grasp.

一方、チャート式プログラムは、個別の制御処理を表す複数のステップを先頭から順次実行することを前提として記述されるため、複数のステップを上流側から下流側に連続して実行する連続運転中に何らかの異常が発生して途中停止すると、異常処理後の再起動時において途中停止前に実行されたステップの処理が再度実行されてしまう場合がある。そして、ステップの動作内容によっては、ワークや制御対象機器を損傷してしまうおそれがある。   On the other hand, since the chart type program is described on the premise that a plurality of steps representing individual control processes are sequentially executed from the top, the continuous operation in which the plurality of steps are sequentially executed from the upstream side to the downstream side is performed. When some abnormality occurs and the process is suspended, the process of the step executed before the process may be performed again at the restart after the abnormal process. Then, depending on the operation contents of the step, there is a possibility that the workpiece or the control target device may be damaged.

そこで、特許文献1に記載のプログラマブルコントローラでは、各トランジションの遷移条件を示すラダープログラムを、再起動時にオン状態となる途中起動フラグと、各トランジションの直前のステップの起動条件等とを組み合わせて構成することによって、途中停止する前に実行済みのステップの処理を再度実行しないように構成している。   Therefore, in the programmable controller described in Patent Document 1, a ladder program indicating transition conditions of each transition is configured by combining an intermediate activation flag that is turned on at restart and activation conditions of steps immediately before each transition and the like. By doing this, it is configured not to re-execute the processing of the step that has already been executed before stopping halfway.

特開2008−97079号公報JP, 2008-97079, A

しかし、このようなラダープログラムを各トランジションに対して作成することは、プログラム作成者の負担が大きかった。そこで、本願発明者らは、このようなプログラム作成者の負担を軽減すべく鋭意検討し、異常処理後の再起動時に再度実行するとワークや制御対象機器を損傷してしまうおそれがあるステップは、チャート式プログラムに含まれる複数のステップのうち一部のステップであることに着目し、この一部のステップの処理を再起動時に実行しないようにすれば、このような損傷を回避することができるという着想を得て本発明をなすに至った。   However, creating such a ladder program for each transition places a heavy burden on the program creator. Therefore, the inventors of the present application diligently study to reduce the burden of such a program creator, and if it is executed again at restart after abnormal processing, there is a possibility that the work or the device to be controlled may be damaged, Such damage can be avoided by noting that the processing of this partial step is executed at the time of restarting, noting that this is a partial step among the plurality of steps included in the chart program. It came to make the present invention on the idea that

すなわち、本発明は、制御対象機器を制御するプログラマブルコントローラで実行可能な制御プログラムを作成するプログラム作成者の負担を軽減することを目的とする。   That is, an object of the present invention is to reduce the burden on a program creator who creates a control program that can be executed by a programmable controller that controls a control target device.

本発明は、上記の目的を達成するため、制御対象機器を制御するプログラマブルコントローラで実行可能な制御プログラムを編集するプログラム編集部、及び前記プログラム編集部で編集される制御プログラムを記憶する記憶部を有する制御プログラムの編集装置であって、前記制御プログラムは、前記制御対象機器の動作単位毎に設けられる複数のステップ、及び前記複数のステップ間の遷移条件を示す複数のトランジションを含むチャート式プログラムと、前記複数のステップの動作内容、及び前記複数のトランジションの遷移条件を複数の接点及びコイルを含む回路要素によって表したラダープログラムとを有し、前記プログラム編集部は、前記複数のステップのうち、前記制御対象機器の可動部を一方向に動作させる順動作ステップと前記可動部を逆方向に操作させる逆動作ステップとの間の中間ステップを抽出する抽出手段と、前記複数のステップを上流側から下流側に連続して実行する連続運転における前記中間ステップの実行開始後に前記連続運転が途中停止して前記チャート式プログラムを最も上流側のステップから再度実行する際に前記中間ステップの実行を行わせないためのプログラム要素を前記制御プログラムに付加するプログラム要素付加手段とを備えた、制御プログラムの編集装置を提供する。   In order to achieve the above object, the present invention provides a program editing unit that edits a control program executable by a programmable controller that controls a control target device, and a storage unit that stores a control program edited by the program editing unit. A control program editing apparatus, wherein the control program includes: a plurality of steps provided for each operation unit of the control target device; and a chart type program including a plurality of transitions indicating transition conditions between the plurality of steps. And a ladder program representing operation contents of the plurality of steps and transition conditions of the plurality of transitions by a circuit element including a plurality of contacts and a coil, and the program editing unit selects one of the plurality of steps Forward operation step of operating the movable part of the device to be controlled in one direction Extraction means for extracting an intermediate step between the reverse operation step for operating the movable part in the reverse direction, and start of execution of the intermediate step in continuous operation in which the plurality of steps are continuously executed from the upstream side to the downstream side Program element adding means for adding a program element to the control program so as not to execute the intermediate step when the continuous operation is stopped halfway and the charting program is re-executed from the most upstream step later An editing apparatus of a control program is provided.

本発明によれば、制御対象機器を制御するプログラマブルコントローラで実行可能な制御プログラムを作成するプログラム作成者の負担を軽減することが可能となる。   According to the present invention, it is possible to reduce the burden on a program creator who creates a control program that can be executed by a programmable controller that controls a control target device.

本発明の第1の実施の形態に係る制御プログラム編集装置を、プログラマブルコントローラ、設備、及び操作盤と共に示す構成図である。BRIEF DESCRIPTION OF THE DRAWINGS It is a block diagram which shows the control program editing apparatus which concerns on the 1st Embodiment of this invention with a programmable controller, an installation, and a control panel. 制御プログラム編集装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of a control program editing apparatus. 制御プログラム編集装置の記憶部に記憶された制御プログラムにおけるチャート式プログラムである。It is a chart-type program in the control program memorize | stored in the memory | storage part of the control program editing apparatus. ダイアログボックスの一例を示す説明図である。It is an explanatory view showing an example of a dialog box. 図3に示すチャート式プログラムに、プログラム要素付加手段によって自動生成されたバイパス回路が追加されたチャート式プログラムの例である。It is an example of the chart-type program which added the bypass circuit automatically produced | generated by the program element addition means to the chart-type program shown in FIG. (a)〜(c)は、プログラム要素付加手段によって生成されるラダープログラムの一例を示す。(A)-(c) show an example of the ladder program produced | generated by the program element addition means. (a)及び(b)は、本発明の第2の実施の形態に係るプログラム要素付加手段によって生成されるラダープログラムの一例を示す。(A) And (b) shows an example of the ladder program produced | generated by the program element addition means which concerns on the 2nd Embodiment of this invention.

[第1の実施の形態]
以下、本発明の第1の実施の形態を、図1乃至図6を参照して説明する。なお、以下に示す実施の形態は、本発明を実施する上での好適な具体例として示すものであり、技術的に好ましい種々の技術的事項を具体的に例示している部分もあるが、本発明の技術的範囲は、この具体的態様に限定されるものではない。
First Embodiment
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS. 1 to 6. Note that the embodiments shown below are shown as preferable specific examples for carrying out the present invention, and there are portions that specifically exemplify various technical matters that are technically preferable, The technical scope of the present invention is not limited to this specific embodiment.

図1は、本発明の第1の実施の形態に係る制御プログラムの編集装置としての制御プログラム編集装置2を、プログラマブルコントローラ10、制御対象機器としての設備12、及びモニタ装置3を備えた操作盤13と共に示す構成図である。   FIG. 1 shows a control program editing device 2 as a control program editing device according to a first embodiment of the present invention, a control panel provided with a programmable controller 10, equipment 12 as a control target device, and a monitoring device 3 It is a block diagram shown with 13. FIG.

本実施の形態では、制御プログラム編集装置2が、MPU(Micro-processing unit)及びその周辺回路等を有して構成された本体部20、表示部としてのディスプレイ201、文字入力部としてのキーボード202、及びポインティングデバイスとしてのタッチパッド203を有する可搬型コンピュータ(ノートパソコン)によって構成されている。ただし、制御プログラム編集装置2の構成はこれに限らず、例えば据置型コンピュータ(デスクトップパソコン)にディスプレイやキーボード及びポインティングデバイス等の周辺機器を組み合わせて構成されていてもよい。   In the present embodiment, the control program editing device 2 includes a main unit 20 configured to include an MPU (Micro-processing unit) and peripheral circuits thereof, a display 201 as a display unit, and a keyboard 202 as a character input unit. And a portable computer (notebook computer) having a touch pad 203 as a pointing device. However, the configuration of the control program editing device 2 is not limited to this, and may be configured by combining, for example, a stationary computer (desktop personal computer) with peripheral devices such as a display, a keyboard, and a pointing device.

制御プログラム編集装置2は、プログラマブルコントローラ10によって実行される制御プログラムを編集する機能を有している。制御プログラム編集装置2において編集された制御プログラムは、通信ケーブル141によってプログラマブルコントローラ10に転送される。この制御プログラムは、SFC言語によって記述されたチャート式プログラムと、チャート式プログラムの後述する各ステップ及びトランジションに対応するラダー言語によるラダープログラムとを含んでいる。これらのSFC言語及びラダー言語は、IEC61131−3規格に規定されたものである。   The control program editing device 2 has a function of editing a control program executed by the programmable controller 10. The control program edited in the control program editing device 2 is transferred to the programmable controller 10 by the communication cable 141. The control program includes a chart type program described in the SFC language, and a ladder program in ladder language corresponding to each step and transition of the chart type program described later. These SFC language and ladder language are those defined in the IEC 61131-3 standard.

プログラマブルコントローラ10は、電源モジュール101、CPUモジュール102、通信モジュール103、出力モジュール104、入力モジュール105、及びこれら各モジュールが装着されたベース100を有して構成されている。電源モジュール101は、ベース100を介して、CPUモジュール102等に電源を供給する。通信モジュール103は、操作盤13のモニタ装置3との通信を行う。   The programmable controller 10 includes a power supply module 101, a CPU module 102, a communication module 103, an output module 104, an input module 105, and a base 100 on which these modules are mounted. The power supply module 101 supplies power to the CPU module 102 and the like through the base 100. The communication module 103 communicates with the monitor device 3 of the operation panel 13.

出力モジュール104は、設備12に設けられた複数のアクチュエータ121に接続された複数の出力接点を有している。複数のアクチュエータ121は、例えばソレノイドやモータ、あるいは油圧を制御する電磁切換弁等からなる。入力モジュール105は、設備12に設けられた複数のセンサ122からの入力信号によってオン/オフする複数の入力接点を有している。複数のセンサ122は、例えば近接センサや光電センサ、あるいはリミットスイッチ等からなる。   The output module 104 has a plurality of output contacts connected to a plurality of actuators 121 provided in the facility 12. The plurality of actuators 121 are, for example, solenoids, motors, or electromagnetic switching valves that control hydraulic pressure. The input module 105 has a plurality of input contacts that are turned on / off by input signals from a plurality of sensors 122 provided in the facility 12. The plurality of sensors 122 are, for example, proximity sensors, photoelectric sensors, limit switches, or the like.

CPUモジュール102は、制御プログラム編集装置2によって編集された制御プログラムを実行し、入力モジュール105の各入力接点の状態等に応じて出力モジュール104の各出力接点をオン/オフさせることにより、設備12を制御する。本実施の形態では、設備12が工作機械であり、搬入されたワークに対して所定の部品の組み付けを行うものとする。   The CPU module 102 executes the control program edited by the control program editing device 2 and turns on / off each output contact of the output module 104 according to the state of each input contact of the input module 105, etc. Control. In the present embodiment, the equipment 12 is a machine tool, and it is assumed that a predetermined part is assembled to the carried-in work.

操作盤13は、モニタ装置3と、自動/各個選択スイッチ131と、運転準備スイッチ132と、起動スイッチ133と、実行スイッチ134と、非常停止スイッチ135とを有している。自動/各個選択スイッチ131は、制御プログラム編集装置2によって編集された制御プログラムに従って連続運転を行う自動運転モードと、設備12のアクチュエータ121に個別の動作を行わせる各個操作モードとを切り替えるスイッチである。運転準備スイッチ132は、設備12のアクチュエータ121を動作可能とするためのスイッチである。起動スイッチ133は、自動運転の起動を指示するためのスイッチである。実行スイッチ134は、各個操作モードでの個別動作の実行を指示するためのスイッチである。非常停止スイッチ135は、設備12の動作を即時停止させるためのスイッチである。これらの各スイッチ131〜135は、プログラマブルコントローラ10の入力モジュール105に接続されている。   The control panel 13 has a monitor device 3, an automatic / each individual selection switch 131, an operation preparation switch 132, an activation switch 133, an execution switch 134, and an emergency stop switch 135. The automatic / each individual selection switch 131 is a switch for switching between an automatic operation mode in which continuous operation is performed according to the control program edited by the control program editing device 2 and an individual operation mode in which the actuator 121 of the facility 12 performs individual operation. . The operation preparation switch 132 is a switch for enabling the actuator 121 of the facility 12. The start switch 133 is a switch for instructing start of the automatic operation. The execution switch 134 is a switch for instructing execution of an individual operation in each individual operation mode. The emergency stop switch 135 is a switch for immediately stopping the operation of the facility 12. Each of these switches 131 to 135 is connected to the input module 105 of the programmable controller 10.

モニタ装置3の表示器31には、自動運転モードにおいて、プログラマブルコントローラ10によるチャート式プログラムの各ステップの実行状況を示す運転状態表示画面が表示される。また、モニタ装置3の表示器31には、各個操作モードにおいて、設備12に行わせることができる個別動作を示す複数の操作ボタンが表示される。図1では、モニタ装置3に運転状態表示画面が表示された状態を示している。   The display 31 of the monitor device 3 displays an operating state display screen that shows the execution status of each step of the chart-type program by the programmable controller 10 in the automatic operation mode. In addition, on the display 31 of the monitor device 3, a plurality of operation buttons indicating individual operations which can be performed by the facility 12 in each individual operation mode are displayed. FIG. 1 shows a state in which the driving state display screen is displayed on the monitor device 3.

モニタ装置3の表示器31は、タッチパネルであり、各個操作モードにおいて設備12の保全担当者等の作業者が表示器31に表示されたボタンを押すことで、当該ボタンに対応する個別動作を設備12に行わせることが可能である。この各個操作は、例えば設備12の自動運転モードでの連続運転中に何らかの異常が発生した場合の復旧作業時に行われる。   The display 31 of the monitor device 3 is a touch panel, and when an operator such as a person in charge of maintenance of the equipment 12 presses a button displayed on the display 31 in each individual operation mode, the individual operation corresponding to the button is It is possible to make it do. Each individual operation is performed, for example, at the time of restoration work when any abnormality occurs during continuous operation in the automatic operation mode of the facility 12.

モニタ装置3は、通信ケーブル142によってプログラマブルコントローラ10の通信モジュール103と接続され、出力モジュール104の各出力接点のオン/オフ状態、入力モジュール105の各入力接点のオン/オフ状態、及びCPUモジュール102が記憶している各種フラグのオン/オフ状態を随時読み出し可能である。また、モニタ装置3は、プログラマブルコントローラ10から、CPUモジュール102が記憶している制御プログラムを読み出すことも可能である。そして、モニタ装置3は、自動運転モードにおいて、表示器31にプログラマブルコントローラ10のCPUモジュール102による制御プログラムの実行状況を随時表示する。   The monitor device 3 is connected to the communication module 103 of the programmable controller 10 by the communication cable 142, and the on / off state of each output contact of the output module 104, the on / off state of each input contact of the input module 105, and the CPU module 102. It is possible to read out the on / off states of various flags stored in the memory at any time. The monitor device 3 can also read the control program stored in the CPU module 102 from the programmable controller 10. Then, in the automatic operation mode, the monitor device 3 displays the execution status of the control program by the CPU module 102 of the programmable controller 10 on the display 31 as needed.

制御プログラム編集装置2によって編集されるチャート式プログラムは、設備12の動作単位毎に設けられる複数のステップと、複数のステップ間の遷移条件を示すトランジションとを含んで記述されたものである。トランジションの遷移条件が満たされていれば、チャート式プログラムの実行を次のステップに進めることが可能となる。チャート式プログラムには、複数のステップの実行順序(フロー)が示されている。   The chart type program edited by the control program editing device 2 is described including a plurality of steps provided for each operation unit of the facility 12 and a transition indicating a transition condition between the plurality of steps. If the transition transition conditions are satisfied, it is possible to advance the execution of the chart expression program to the next step. The charting program shows the execution order (flow) of a plurality of steps.

チャート式プログラムに含まれる複数のステップのうち少なくとも一部のステップは、設備12の可動部を一方向に動作させる順動作ステップ、及びこの可動部を逆方向に操作させる逆動作ステップからなるステップ対をなす。順動作ステップから見た場合、逆動作ステップは反対動作ステップとなる。また、逆動作ステップから見た場合、順動作ステップは反対動作ステップとなる。通常、チャート式プログラムには、複数のステップ対が含まれる。   At least some of the steps included in the charting program are a pair of steps consisting of a forward operation step of operating the movable part of the equipment 12 in one direction and a reverse operation step of operating the movable part in the reverse direction. I When viewed from the forward operation step, the reverse operation step is the opposite operation step. Also, when viewed from the reverse operation step, the forward operation step is the opposite operation step. Typically, charted programs include multiple step pairs.

それぞれのステップ及びトランジションには、ラダープログラムが割り当てられている。ステップに割り当てられたラダープログラムは、当該ステップにおける具体的な動作内容を複数の接点及びコイルを含む回路要素によって表している。また、トランジションに割り当てられたラダープログラムは、ステップ間の遷移条件を1つ又は複数の接点及びコイルを含む回路要素によって表している。   A ladder program is assigned to each step and transition. The ladder program assigned to the step represents the specific operation content in the step by a circuit element including a plurality of contacts and a coil. Also, the ladder program assigned to the transition represents transition conditions between steps by circuit elements including one or more contacts and a coil.

コイル及びリレーは、1つのリレーの構成要素として考えることができる。すなわち、リレーのコイルへの通電又は非通電により、このリレーの接点がオン又はオフされる。接点には、コイルへの通電時にオン状態となり、非通電時にオフ状態となるa接点と、コイルへの通電時にオフ状態となり、非通電時にオン状態となるb接点とがある。また、リレーには、例えば出力モジュール104に内蔵された実リレーと、ラダープログラムを記述するために用いられる仮想の内部リレー及びキープリレーと、CPUモジュール102自体の処理によって接点がオン/オフされるステップ起動リレーがある。   Coils and relays can be considered as components of one relay. That is, the contact of this relay is turned on or off by energizing or de-energizing the coil of the relay. The contacts include an a contact which is turned on when the coil is energized and is turned off when the coil is not energized, and a b contact which is turned off when the coil is energized and is turned on when the coil is not energized. Also, in the relays, for example, contacts are turned on / off by processing of an actual relay built in the output module 104, virtual internal relays and keep relays used for describing a ladder program, and the CPU module 102 itself. There is a step start relay.

各リレーには、それぞれを識別するためのアドレスが割り当てられている。本実施の形態では、実リレーには「Y」で始まるアドレス(例えば、「Y001」,「Y002」など)が割り当てられ、内部リレーには「M」で始まるアドレス(例えば、「M001」,「M002」など)が割り当てられる。また、キープリレーには「K」で始まるアドレス(例えば、「K001」,「K002」など)が割り当てられる。キープリレーは、プログラマブルコントローラ10の電源が遮断された場合でも、そのオン/オフ状態が記憶されるリレーであり、コイルとしてセットコイルとリセットコイルとを有する。セットコイルへ通電されると、キープリレーのa接点がオン状態となり、リセットコイルへ通電されると、キープリレーのa接点がオフ状態となる。b接点は、a接点と逆のオン/オフ状態となる。   Each relay is assigned an address for identifying each relay. In the present embodiment, the real relays are assigned addresses starting with "Y" (for example, "Y001", "Y002", etc.), and the internal relays are addresses starting with "M" (for example, "M001", M002 etc.) are assigned. Also, addresses (eg, "K001", "K002", etc.) beginning with "K" are assigned to the keep relay. The keep relay is a relay that stores its on / off state even when the power of the programmable controller 10 is shut off, and has a set coil and a reset coil as coils. When the set coil is energized, the a contact of the keep relay is turned on, and when the reset coil is energized, the a contact of the keep relay is turned off. The b-contact is in the on / off state opposite to the a-contact.

ステップ起動リレーには、「EK」で始まるアドレス(例えば、「EK001」,「EK002」など)が割り当てられる。このステップ起動リレーは、各ステップに対応するラダープログラムの実行を行わせるためのものである。CPUモジュール102は、チャート式プログラムの実行時において、トランジションを通過して次のステップの処理の実行を開始する際に、そのステップに対応するステップ起動リレーの接点を一時的にオン状態とする。   The step activation relay is assigned an address beginning with "EK" (for example, "EK001", "EK002", etc.). The step activation relay is for executing the execution of the ladder program corresponding to each step. At the time of execution of the chart program, when the CPU module 102 passes through the transition and starts to execute the processing of the next step, the contact of the step activation relay corresponding to that step is temporarily turned on.

ラダープログラムにおいて、コイルは出力要素であり、コイルが通電状態(活性状態)となるか、あるいは非通電状態(非活性状態)となるかの条件設定が、1つ又は複数の接点の組み合わせによって規定される。例えば、アドレスとしてY001が割り当てられた実リレーのコイルが通電状態となる条件が満たされた場合には、このY001の実リレーの接点(a接点)がオン状態となると共に、この接点に接続された設備12のアクチュエータ121が動作する。   In the ladder program, the coil is an output element, and the condition setting of whether the coil is in the energized state (activated state) or not energized (inactivated state) is specified by the combination of one or more contacts. Be done. For example, when the condition that the coil of an actual relay to which Y001 is assigned as an address is turned on is satisfied, the contact (a contact) of the actual relay of Y001 is turned on and connected to the contact The actuator 121 of the equipment 12 operates.

モニタ装置3は、CPUモジュール102が実行中のステップを、その前後のステップと共に表示器31に表示する。この際、モニタ装置3は、例えば表示色を変えることにより、CPUモジュール102が実行中のステップを他のステップと識別可能に表示する。図1に示す例では、CPUモジュール102が実行中のステップをハッチングで図示している。   The monitor device 3 displays the steps being executed by the CPU module 102 on the display 31 together with the preceding and subsequent steps. At this time, the monitor device 3 displays the step being executed by the CPU module 102 in a distinguishable manner from other steps, for example, by changing the display color. In the example illustrated in FIG. 1, steps being executed by the CPU module 102 are illustrated by hatching.

図2は、制御プログラム編集装置2の機能構成を示すブロック図である。制御プログラム編集装置2は、プログラマブルコントローラ10で実行可能な制御プログラムを編集するためのプログラム編集部21を有する本体部20、編集中の制御プログラムを表示するディスプレイ201、ならびにキーボード202及びタッチパッド203を有している。本体部20は、さらに、プログラム編集部21によって編集される制御プログラムを記憶する記憶部22、及びプログラマブルコントローラ10との通信を行う通信部23を有している。記憶部22は、例えばハードディスクや半導体記憶素子からなる。   FIG. 2 is a block diagram showing a functional configuration of the control program editing device 2. The control program editing device 2 includes a main unit 20 having a program editing unit 21 for editing a control program executable by the programmable controller 10, a display 201 for displaying the control program being edited, a keyboard 202, and a touch pad 203. Have. The main body unit 20 further includes a storage unit 22 that stores the control program edited by the program editing unit 21 and a communication unit 23 that communicates with the programmable controller 10. The storage unit 22 is formed of, for example, a hard disk or a semiconductor storage element.

なお、タッチパッド203に替えて、例えばマウスやトラックボールをポインティングデバイスとして用いることも可能である。また、ディスプレイ201を例えば液晶パネル等の表示装置とタッチパッド等の位置入力装置とを組み合わせて構成した場合には、この位置入力装置をポインティングデバイスとして用いることができ、さらに表示装置に表示された文字を位置入力装置へのタッチ操作によって選択することで、キーボード202に替えて文字入力を行うことも可能である。   Instead of the touch pad 203, for example, a mouse or a track ball can be used as a pointing device. Further, when the display 201 is configured by combining a display device such as a liquid crystal panel and a position input device such as a touch pad, for example, this position input device can be used as a pointing device and is further displayed on the display device. It is also possible to perform character input instead of the keyboard 202 by selecting characters by touch operation on the position input device.

プログラム編集部21は、制御プログラム編集装置2に予めインストールされたプログラムをMPUが実行することで、中間ステップ抽出手段211、及びプログラム要素付加手段212として動作する。   The program editing unit 21 operates as an intermediate step extracting unit 211 and a program element adding unit 212 as the MPU executes a program installed in advance in the control program editing device 2.

中間ステップ抽出手段211は、チャート式プログラムに含まれる複数のステップのうち、設備12の可動部を一方向に動作させる順動作ステップと、この可動部を逆方向に操作させる逆動作ステップとの間の中間ステップを抽出する。   The intermediate step extracting means 211 is, among a plurality of steps included in the chart program, between a forward operation step of operating the movable part of the equipment 12 in one direction and a reverse operation step of operating the movable part in the reverse direction. Extract the intermediate steps of

また、プログラム要素付加手段212は、複数のステップを上流側から下流側に連続して実行する連続運転における中間ステップの実行開始後に連続運転が途中停止してチャート式プログラムを最も上流側のステップから再度実行する際に中間ステップの実行を行わせないためのプログラム要素を制御プログラムに付加する。   In addition, the program element adding unit 212 stops the continuous operation halfway after the start of the execution of the intermediate step in the continuous operation in which the plurality of steps are continuously performed from the upstream side to the downstream side, and the chart type program is started from the most upstream step. A program element is added to the control program so as not to execute the intermediate step when executing again.

中間ステップ抽出手段211及びプログラム要素付加手段212のより詳細な処理内容については後述する。   More detailed processing contents of the intermediate step extraction unit 211 and the program element addition unit 212 will be described later.

図3は、制御プログラム編集装置2の記憶部22に記憶された制御プログラムにおけるチャート式プログラムの具体例を示す。このチャート式プログラムは、IEC61131−3規格にのっとり、個別の制御処理を表す複数のステップと、ステップ間の遷移条件を表すトランジションとを、交互に並べて記述される。チャート式プログラムの先頭のステップである「ST000」は、自動運転モードで設備12の連続運転を行う自動サイクルを示すステップである。プログラマブルコントローラ10は、自動運転の開始時に、チャート式プログラムの最上流にあたる「ST000」から下流側に向かって、順次各ステップの制御処理を実行する。   FIG. 3 shows a specific example of the chart-type program in the control program stored in the storage unit 22 of the control program editing device 2. According to the IEC 61131-3 standard, this chart program is described by alternately arranging a plurality of steps representing individual control processing and a transition representing a transition condition between steps. “ST000”, which is the first step of the chart program, is a step indicating an automatic cycle in which the equipment 12 is continuously operated in the automatic operation mode. At the start of the automatic operation, the programmable controller 10 sequentially executes control processing of each step from "ST000", which is the most upstream of the chart-type program, toward the downstream side.

図3に示すチャート式プログラムは、前後ユニット前進動作(ST001)、上下ユニット上昇動作(ST002)、組付けサイクル(ST003)、上下ユニット下降動作(ST004)、及び前後ユニット後退動作(ST005)の各ステップの制御処理を順次実行するように構成されている。ここで、ST000〜ST005は、各ステップのステップ番号である。   The chart type program shown in FIG. 3 is each of forward and backward unit forward movement (ST001), upper and lower unit uplift movement (ST002), assembly cycle (ST003), upper and lower unit down movement (ST004), and forward and backward unit backward movement (ST005). The control process of the steps is configured to be sequentially executed. Here, ST000 to ST005 are step numbers of each step.

このチャート式プログラムにおいて、前後ユニット前進動作のステップ(ST001)は、設備12の可動部である前後ユニットを一方向(前進方向)に動作させる順動作ステップであり、前後ユニット後退動作のステップ(ST005)は、前後ユニットを逆方向(後退方向)に動作させる逆動作ステップである。また、上下ユニット上昇動作のステップ(ST002)は、設備12の可動部である上下ユニットを一方向(上昇方向)に動作させる順動作ステップであり、上下ユニット下降動作のステップ(ST004)は、上下ユニットを逆方向(下降方向)に動作させる逆動作ステップである。   In this chart type program, the step (ST001) of the front and back unit advancing operation is a forward operation step of operating the front and back unit which is the movable part of the equipment 12 in one direction (forward direction). ) Is a reverse operation step for moving the front and rear units in the reverse direction (backward direction). The step (ST002) of the upper and lower unit raising operation is a forward operation step of operating the upper and lower units which are the movable part of the equipment 12 in one direction (raising direction). The step (ST004) of the upper and lower unit lowering operation is This is a reverse operation step of operating the unit in the reverse direction (downward direction).

前後ユニット前進動作のステップ(ST001)と前後ユニット後退動作のステップ(ST005)とは1つのステップ対をなす。同様に、上下ユニット上昇動作のステップ(ST002)と上下ユニット下降動作のステップ(ST004)とは1つのステップ対をなす。すなわち、このチャート式プログラムには、2つのステップ対が含まれている。   The step (ST001) of the front-rear unit advancing operation and the step (ST005) of the front-rear unit backward operation form one step pair. Similarly, the step of the upper and lower unit raising operation (ST002) and the step of the upper and lower unit lowering operation (ST004) constitute one step pair. That is, the charting program includes two step pairs.

各ステップに対する反対ステップは、チャート式プログラムの作成時にプログラム作成者によって設定される。より具体的には、プログラム作成者がチャート式プログラムを作成する際に、制御プログラム編集装置2のディスプレイ201に表示されるダイアログボックスに対してプログラム作成者が入力操作を行うことによって設定される。   The opposite step to each step is set by the program creator when creating the charting program. More specifically, when the program creator creates a chart-type program, the program creator performs an input operation on a dialog box displayed on the display 201 of the control program editing device 2 to set.

図4は、このダイアログボックスの一例を示す説明図である。図4では、例として、前後ユニット前進動作のステップ(ST001)に関する反対動作ステップを入力するためのダイアログボックス24を示している。   FIG. 4 is an explanatory view showing an example of this dialog box. FIG. 4 shows, as an example, a dialog box 24 for inputting an opposite operation step related to the step (ST001) of the front / rear unit advancing operation.

ダイアログボックス24には、当該ステップ(ST001)の動作内容を示すコメントを入力するためのコメント欄241と、反対動作を選択するためのプルダウンメニュー欄242が設けられている。プログラム作成者は、ステップの動作内容を示すコメントをコメント欄241に入力すると共に、プルダウンメニュー欄242のプルダウンメニューから反対動作ステップを選択する。その後、プログラム作成者がダイアログボックス3のOKボタン243をクリックすると、ダイアログボックス24のコメント欄241及びプルダウンメニュー欄242に入力又は選択された内容が確定し、この設定内容が記憶部22に記憶される。なお、反対動作ステップがない場合には、プルダウンメニュー欄242から反対動作ステップを選択する操作は不要である。   The dialog box 24 is provided with a comment column 241 for inputting a comment indicating the operation content of the step (ST001), and a pull-down menu column 242 for selecting the opposite operation. The program creator inputs a comment indicating the operation content of the step into the comment column 241, and selects the opposite operation step from the pull-down menu of the pull-down menu column 242. Thereafter, when the program creator clicks the OK button 243 of the dialog box 3, the contents input or selected in the comment column 241 and the pull-down menu column 242 of the dialog box 24 are determined, and the setting contents are stored in the storage unit 22. Ru. When there is no opposite operation step, an operation to select the opposite operation step from the pull-down menu column 242 is unnecessary.

ところで、設備12は、その自動運転中に様々な要因により途中停止する場合がある。例えば組付けサイクル(ST003)におけるワークへの部品の組み付け完了後、上下ユニットがワークに干渉すること等により上下ユニット下降動作のステップ(ST004)が動作完了に至らない場合等には、トランジション「TR004」の遷移条件が満たされず、設備12が途中停止する。このような場合には、作業者がモニタ装置3の表示内容によって何れのステップで途中停止しているかを確認し、自動/各個選択スイッチ131を各個操作モードに切り替え、各個操作によって異常処理を行う。その後さらに作業者は、自動/各個選択スイッチ131を自動運転モードに切り替え、設備12の自動運転を再開(再起動)させる。   By the way, the installation 12 may be stopped halfway due to various factors during its automatic operation. For example, after the assembly of parts to the work in the assembly cycle (ST 003) is completed, the upper and lower units interfere with the work, etc., and so on. The transition condition of “is not satisfied, and the facility 12 stops halfway. In such a case, it is confirmed in which step the worker is stopping halfway according to the display content of the monitor device 3, and the automatic / each-piece selection switch 131 is switched to each-piece operation mode, and the abnormality processing is performed by each piece of operation. . Thereafter, the worker switches the automatic / each-piece selection switch 131 to the automatic operation mode to restart (restart) the automatic operation of the facility 12.

この際、プログラマブルコントローラ10は、チャート式プログラムの最も上流側のステップから実行を再開する。しかし、ワークは既に部品の組み付けが完了した状態であるため、組付けサイクル(ST003)の実行を行わせないようにする必要がある。   At this time, the programmable controller 10 resumes execution from the most upstream step of the chart program. However, since the workpiece is already in a state where the assembly of parts has been completed, it is necessary to prevent the execution of the assembly cycle (ST003).

本実施の形態では、プログラム要素付加手段212が、中間ステップ抽出手段211によって抽出された中間ステップのチャート式プログラムにおける上流側と下流側とを結ぶバイパス回路、及び中間ステップの実行開始後に連続運転が途中停止してチャート式プログラムを最も上流側のステップから再度実行する場合にバイパス回路を有効とするためのトランジションをチャート式プログラムに付加する。これらのバイパス回路及びトランジションは、プログラム要素付加手段212によって付加されるプログラム要素の一態様である。   In the present embodiment, the program element addition means 212 includes a bypass circuit connecting the upstream side and the downstream side in the chart program of the intermediate step extracted by the intermediate step extraction means 211, and continuous operation after the start of execution of the intermediate step. A transition for enabling the bypass circuit is added to the chart-type program when stopping halfway and executing the chart-type program again from the most upstream step. These bypass circuits and transitions are an aspect of the program element added by the program element adding means 212.

ここで、中間ステップ抽出手段211が中間ステップを抽出する際の処理内容の具体例について説明する。中間ステップ抽出手段211は、以下の手順1〜3によって、チャート式プログラムの各ステップの中から中間ステップを抽出する。   Here, a specific example of processing contents when the intermediate step extraction unit 211 extracts the intermediate step will be described. The intermediate step extraction unit 211 extracts an intermediate step from each step of the chart expression program according to the following procedures 1 to 3.

手順1:チャート式プログラムの先頭のステップから順次、反対動作ステップが設定されているか否かを判定し、ステップ対をなす順動作ステップ及び逆動作ステップを抽出する。   Procedure 1: From the top step of the chart type program, it is judged sequentially whether or not the opposite operation step is set, and the forward operation step and the reverse operation step forming the step pair are extracted.

手順2:手順1で抽出された順動作ステップ及び逆動作ステップとの間のステップを候補ステップとして抽出する。複数のステップ対がある場合には、それぞれのステップ対の順動作ステップ及び逆動作ステップとの間のステップを候補ステップとして抽出する。   Step 2: Extract a step between the forward operation step and the reverse operation step extracted in Step 1 as a candidate step. When there are a plurality of step pairs, steps between the forward operation step and the reverse operation step of each step pair are extracted as candidate steps.

手順3:チャート式プログラム中に複数のステップ対が存在する場合、その全てのステップ対について共通して抽出された候補ステップを中間ステップとする。チャート式プログラム中に1つのステップ対のみが存在する場合には、そのステップ対について抽出された候補ステップを中間ステップとする。   Procedure 3: When a plurality of step pairs exist in the chart program, candidate steps extracted in common for all the step pairs are regarded as intermediate steps. If there is only one step pair in the charting program, let the candidate step extracted for that step pair be an intermediate step.

図3に示したチャート式プログラムでは、前後ユニット前進動作のステップ(ST001)と前後ユニット後退動作のステップ(ST005)とがステップ対をなすので、手順2によって、これら両ステップの間のステップ(ST002〜ST004)が候補ステップとして抽出される。また、図3に示したチャート式プログラムでは、上下ユニット上昇動作のステップ(ST002)と上下ユニット下降動作のステップ(ST004)とがステップ対をなすので、手順2によって、これら両ステップの間のステップ(ST003)が候補ステップとして抽出される。そして、手順3によって、それぞれ抽出された候補ステップに共通して含まれる組付けサイクル(ST003)が、中間ステップとして抽出される。   In the chart type program shown in FIG. 3, since the step (ST001) of the front-rear unit advancing operation and the step (ST005) of the front-rear unit retracting operation form a step pair, the step 2 between these two steps (ST002) ~ ST004) are extracted as candidate steps. Further, in the chart type program shown in FIG. 3, since the step (ST002) of the upper and lower unit raising operation and the step (ST004) of the upper and lower unit lowering operation form a step pair, step 2 between these two steps (ST003) is extracted as a candidate step. Then, according to procedure 3, the assembly cycle (ST003) included in common to the extracted candidate steps is extracted as an intermediate step.

プログラム要素付加手段212は、このようにして抽出された中間ステップの実行開始後に設備12の連続運転が途中停止し、チャート式プログラムを最も上流側のステップから再度実行する際に、この中間ステップの実行を行わせないためのプログラム要素を制御プログラムに付加する。   The program element adding means 212 stops the continuous operation of the equipment 12 halfway after starting the execution of the intermediate step extracted in this way, and executes again the chart type program from the most upstream step. Add program elements to the control program to prevent execution.

図5は、図3に示すチャート式プログラムに、プログラム要素付加手段212によって自動生成されたバイパス回路4が追加されたチャート式プログラムの例である。図5では、プログラム要素付加手段212によって追加されたバイパス回路4を破線で囲って示している。   FIG. 5 is an example of a chart type program in which the bypass circuit 4 automatically generated by the program element adding means 212 is added to the chart type program shown in FIG. In FIG. 5, the bypass circuit 4 added by the program element adding means 212 is shown surrounded by a broken line.

このバイパス回路4は、中間ステップであるステップ「ST003」の1つ上流側に生成されたダミーステップ40と、このダミーステップ40とステップ「ST003」との間に生成された第1のトランジション(TR011)41と、第1のトランジション41と並列に生成された第2のトランジション(TR012)42と、第2のトランジション42を通過した場合のジャンプ先を示すバイパス経路43とを含んでいる。   The bypass circuit 4 includes a dummy step 40 generated on the upstream side of one of the intermediate steps “ST003” and a first transition (TR011) generated between the dummy step 40 and the step “ST003”. 41), a second transition (TR012) 42 generated in parallel with the first transition 41, and a bypass path 43 indicating a jump destination when the second transition 42 is passed.

バイパス経路43は、ステップ「ST003」を迂回して、第2のトランジション42と、中間ステップであるステップ「ST003」の一つ下流側のステップであるステップ「ST004」とを接続している。すなわち、バイパス経路43のジャンプ先は、中間ステップとして抽出されたステップの一つ下流側のステップの直前であり、第2のトランジション42の遷移条件が満たされた場合は、中間ステップのトランジション「TR003」の遷移条件である組付け完了の成否にかかわらず、ステップ「ST004」以降のステップが実行される。なお、複数の中間ステップが抽出された場合には、そのうち最も下流側のステップのさらに一つ下流側のステップの直前がバイパス経路43のジャンプ先となる。   The bypass path 43 bypasses the step "ST003" and connects the second transition 42 and the step "ST004" which is a step downstream of the intermediate step "ST003". That is, the jump destination of the bypass path 43 is immediately before the step one downstream of the step extracted as the intermediate step, and when the transition condition of the second transition 42 is satisfied, the transition “TR003 of the intermediate step Regardless of the success or failure of the assembly completion which is the transition condition of “1”, the steps after step “ST004” are executed. When a plurality of intermediate steps are extracted, the jump path of the bypass path 43 is the position immediately before the step further downstream of the most downstream step among them.

プログラム要素付加手段212は、チャート式プログラムにバイパス回路4を付加すると共に、ラダープログラムにも回路を追加する。図6(a)〜(c)は、プログラム要素付加手段212によって生成されるラダープログラムの一例を示し、(a)は中間ステップであるステップ「ST003」に、(b)は第1のトランジション41に、(c)は第2のトランジション42に、それぞれ対応するラダープログラムを示している。   The program element adding unit 212 adds the bypass circuit 4 to the chart program and also adds the circuit to the ladder program. 6 (a) to 6 (c) show an example of a ladder program generated by the program element adding unit 212, where (a) is an intermediate step, step "ST003", and (b) is a first transition 41. 7 (c) shows a ladder program corresponding to the second transition 42, respectively.

ステップ「ST003」に対応するラダープログラム50は、ステップ「ST003」のステップ起動リレーの接点である「EK03」がオン状態となることによりキープリレー「K01」がオン状態にセットされる第1の回路501と、キープリレー「K01」をオフ状態にリセットするための第2の回路502によって構成される。   The ladder program 50 corresponding to the step "ST003" is a first circuit in which the keep relay "K01" is set to the on state when the "EK03" which is a contact of the step activation relay of the step "ST003" is turned on. And a second circuit 502 for resetting the keep relay "K01" to the off state.

第1の回路501は、ステップ起動リレー「EK03」の接点のオン/オフ状態のみに応じて、この接点がオン状態である場合にキープリレー「K01」がセットされるラダープログラムとして生成されるが、プログラム作成者は、この他にキープリレー「K01」をセットするための条件となる各種のインタロック信号等の接点を必要に応じて追加することができる。   The first circuit 501 is generated as a ladder program in which the keep relay “K01” is set when the contact is in the ON state only in accordance with the ON / OFF state of the contact of the step activation relay “EK03”. The program creator can add other contacts such as various interlock signals as conditions for setting the keep relay “K01” as needed.

第2の回路502としては、常時オン接点である「V04」のb接点(反転接点)によってキープリレー「K01」がリセットされる回路が生成されるが、「V04」のb接点は常時オフであるので、この回路のままではキープリレー「K01」がリセットされない。このため、プログラム作成者は、設備12の構成に応じて、キープリレー「K01」をリセットするための条件設定を第2の回路502に追加する。具体的には、例えば設備12の各可動部が原位置にあることを示す接点を、「V04」のb接点に替えて追加する。   As the second circuit 502, a circuit in which the keep relay "K01" is reset is generated by the b contact (inverted contact) of "V04" which is always on contact, but the b contact of "V04" is always off Because there is, keep relay "K01" is not reset with this circuit. Therefore, the program creator adds the condition setting for resetting the keep relay “K01” to the second circuit 502 in accordance with the configuration of the facility 12. Specifically, for example, a contact indicating that each movable part of the facility 12 is in the original position is added to the b contact of “V04” instead of the contact b.

このキープリレー「K01」は、第1及び第2のトランジション41,42における遷移条件として用いられる。具体的には、キープリレー「K01」がリセットされているとき、遷移条件が満たされるように構成されたラダープログラム51が第1のトランジション41に対応して設けられる。また、キープリレー「K01」がセットされているとき、遷移条件が満たされるように構成されたラダープログラム52が第2のトランジション42に対応して設けられる。   The keep relay “K01” is used as a transition condition in the first and second transitions 41 and. Specifically, a ladder program 51 configured to satisfy the transition condition when the keep relay “K01” is reset is provided corresponding to the first transition 41. In addition, a ladder program 52 configured to satisfy the transition condition is provided corresponding to the second transition 42 when the keep relay “K01” is set.

第1のトランジション41に割り当てられたラダープログラム51におけるリレー「TR011」は、第1のトランジション41の遷移条件を示し、このリレー「TR011」がオン状態であれば、第1のトランジション41が通過可能状態となる。また、第2のトランジション42に割り当てられたラダープログラム52におけるリレー「TR012」は、第2のトランジション42の遷移条件を示し、このリレー「TR012」がオン状態であれば、第2のトランジション42が通過可能状態となる。   The relay “TR011” in the ladder program 51 assigned to the first transition 41 indicates the transition condition of the first transition 41. If the relay “TR011” is in the on state, the first transition 41 can pass through. It becomes a state. Further, the relay “TR012” in the ladder program 52 assigned to the second transition 42 indicates the transition condition of the second transition 42, and if the relay “TR012” is in the on state, the second transition 42 is It becomes possible to pass.

途中停止後の再起動ではなく、設備12の自動運転がチャート式プログラムの先頭のステップであるステップ「ST000」から開始された場合、キープリレー「K01」はオフ状態であるので、第1のトランジション41の遷移条件が満たされ、ステップ「ST002」の次には、ステップ「ST003」の制御処理が実行される。   When automatic operation of the facility 12 is started from step "ST000" which is the first step of the chart-type program instead of restarting after stopping halfway, the keep relay "K01" is in the off state, so the first transition The transition condition of 41 is satisfied, and next to step "ST002", control processing of step "ST003" is performed.

一方、ステップ「ST003」の制御処理によるワークへの組み付け加工が開始された後に途中停止した場合の再起動時には、ステップ「ST003」の制御処理の実行時に、第1の回路501によってセットされたキープリレー「K01」のオン状態が維持されているので、第1のトランジション41の遷移条件は満たされず、第2のトランジション42の遷移条件が満たされる。これにより、バイパス経路43が有効となり、組付けサイクル(ST003)の制御処理の実行が省略される。これにより、ワークや設備12の損傷を回避することが可能となる。   On the other hand, at the time of restart when the assembling process to the work by the control process of the step "ST003" is started and then stopped halfway, the keep set by the first circuit 501 when the control process of the step "ST003" is executed. Since the on state of the relay “K01” is maintained, the transition condition of the first transition 41 is not satisfied, and the transition condition of the second transition 42 is satisfied. As a result, the bypass path 43 is enabled, and the execution of the control process of the assembly cycle (ST003) is omitted. This makes it possible to avoid damage to the work and the equipment 12.

(第1の実施の形態の効果)
以上説明した第1の実施の形態によれば、以下に述べる効果が得られる。
(Effect of the first embodiment)
According to the first embodiment described above, the following effects can be obtained.

(1)中間ステップ抽出手段211によってワークへの加工がなされる中間ステップが抽出され、プログラム要素付加手段212によって、途中停止後の再起動時に中間ステップの処理の実行を行わせないためのプログラム要素が付加される。このため、プログラム作成者の負担を軽減することが可能となる。 (1) The intermediate step extracting unit 211 extracts an intermediate step to be processed into a work, and the program element adding unit 212 does not execute the processing of the intermediate step at the time of restarting after the intermediate stop Is added. Therefore, it is possible to reduce the burden on the program creator.

(2)プログラム要素付加手段212によって生成されたバイパス経路及びトランジションがプログラム要素としてチャート式プログラムに付加されるので、プログラム作成者以外の第三者(設備12の保全担当者等)にとっても、その内容を容易に把握することが可能となる。 (2) The bypass path and transition generated by the program element adding unit 212 are added to the chart-type program as the program element, so that third parties (such as maintenance personnel of the facility 12) other than the program creator It becomes possible to grasp the contents easily.

[第2の実施の形態]
次に、本発明の第2の実施の形態について、図7を参照して説明する。本実施の形態に係る制御プログラム編集装置2は、第1の実施の形態について図2を参照して説明したものと同様に構成されているが、プログラム要素付加手段212による処理の内容が第1の実施の形態とは異なる。以下、このプログラム要素付加手段212の処理内容について、図3に示すチャート式プログラムを含む制御プログラムに対して中間ステップの実行を行わせないためのプログラム要素を付加する場合を例にとって詳細に説明する。
Second Embodiment
Next, a second embodiment of the present invention will be described with reference to FIG. The control program editing device 2 according to the present embodiment is configured the same as that described in the first embodiment with reference to FIG. 2, but the content of processing by the program element adding unit 212 is the first. Is different from the embodiment of FIG. The process contents of the program element adding means 212 will be described in detail below, taking as an example the case of adding a program element for preventing the execution of the intermediate step to the control program including the chart type program shown in FIG. .

本実施の形態に係るプログラム要素付加手段212は、途中停止後の再起動に中間ステップの処理の実行を行わせないためのプログラム要素として、中間ステップ抽出手段211によって抽出された中間ステップに対応するトランジションのラダープログラムに、この中間ステップの実行を行わせないための回路要素を付加する。   The program element attachment means 212 according to the present embodiment corresponds to the intermediate step extracted by the intermediate step extraction means 211 as a program element for preventing the execution of the process of the intermediate step at the restart after the halfway stop. The transition ladder program is added with circuit elements for preventing the execution of this intermediate step.

図7(a)及び(b)は、本実施の形態に係るプログラム要素付加手段212によって生成されるラダープログラムの一例を示す。図7(a)は中間ステップであるステップ「ST003」のラダープログラムであり、図7(b)は、ステップ「ST003」に対応するトランジション「TR003」のラダープログラムである。   FIGS. 7A and 7B show an example of a ladder program generated by the program element attachment unit 212 according to the present embodiment. FIG. 7A shows a ladder program of step “ST003” which is an intermediate step, and FIG. 7B shows a ladder program of transition “TR003” corresponding to step “ST003”.

ステップ「ST003」のラダープログラム60は、図6を参照して第1の実施の形態において説明したものと同様であり、ステップ「ST003」のステップ起動リレーの接点である「EK03」がオン状態となることによりキープリレー「K01」がオン状態にセットされる第1の回路601と、キープリレー「K01」をオフ状態にリセットするための第2の回路602によって構成される。プログラム作成者は、第1の回路601及び第2の回路602に各種のインタロック信号等の接点を適宜追加する。   The ladder program 60 of step "ST003" is the same as that described in the first embodiment with reference to FIG. 6, and "EK03" which is a contact of the step activation relay of step "ST003" is in the on state As a result, the first circuit 601 in which the keep relay “K01” is set to the on state and the second circuit 602 for resetting the keep relay “K01” to the off state are configured. The program creator appropriately adds contacts such as various interlock signals to the first circuit 601 and the second circuit 602.

図7(b)に示すトランジション「TR003」のラダープログラム61におけるリレー「TR003」は、トランジション「TR003」の遷移条件を示すリレーであり、このリレー「TR003」がオン状態であれば、トランジション「TR003」が通過可能状態となる。また、ステップ「ST003」の実行を開始する前にリレー「TR003」がオン状態であれば、連続運転中にトランジション「TR002」を通過した後、ステップ「ST003」の制御処理を実行することなく、トランジション「TR003」を通過する。   The relay "TR003" in the ladder program 61 of the transition "TR003" shown in FIG. 7 (b) is a relay indicating transition conditions of the transition "TR003", and if the relay "TR003" is in the on state, the transition "TR003" "Will be able to pass through. In addition, if relay “TR003” is in the on state before starting execution of step “ST003”, after passing transition “TR002” during continuous operation, without executing the control processing of step “ST003”, Pass the transition "TR003".

図7(b)に示すラダープログラム61において、点線で囲って示す領域610には、プログラム作成者によって設備12の構成に応じた各種の接点が設けられる。プログラム要素付加手段212は、この領域610と並列に、キープリレー「K01」がセットされた状態でオン状態となるキープリレー「K01」の接点(a接点)を付加する。これにより、途中停止後の再起動時には、ステップ「ST003」の制御処理が実行されない。   In the ladder program 61 shown in FIG. 7B, various contacts corresponding to the configuration of the facility 12 are provided by the program creator in an area 610 surrounded by a dotted line. The program element adding unit 212 adds a contact (contact a) of the keep relay “K01” which is turned on in a state where the keep relay “K01” is set, in parallel with the area 610. As a result, at the time of restarting after the midway stop, the control process of step "ST003" is not executed.

なお、このようなキープリレー「K01」の接点(a接点)を、中間ステップよりも上流側のステップ(ST001〜ST002)のトランジション(TR001〜TR002)のラダープログラムにも追加すれば、途中停止後の再起動時にステップ(ST001〜ST002)の制御処理の実行を省略することができる。   If such a contact (a contact) of the keep relay “K01” is added to the ladder program of the transition (TR001 to TR002) of the steps (ST001 to ST002) upstream of the intermediate step, after stopping The execution of the control process of steps (ST001 to ST002) can be omitted at the time of restarting.

本実施の形態によれば、プログラム要素付加手段212によって途中停止後の再起動時に中間ステップの処理の実行を行わせないためのプログラム要素が付加されるので、第1の実施の形態と同様に、プログラム作成者の負担を軽減することが可能となる。   According to the present embodiment, the program element addition means 212 adds a program element for preventing the execution of the processing of the intermediate step at the time of restart after a halfway stop, and therefore, similar to the first embodiment. It is possible to reduce the burden on the program creator.

10…プログラマブルコントローラ、100…ベース、101…電源モジュール、102…CPUモジュール、103…通信モジュール、104…出力モジュール、105…入力モジュール、12…設備(制御対象機器)、121…アクチュエータ、122…センサ、13…操作盤、130…モニタ装置、130a…表示器、131…各個選択スイッチ、132…運転準備スイッチ、133…起動スイッチ、134…実行スイッチ、135…非常停止スイッチ、141,142…通信ケーブル、2…制御プログラム編集装置、20…本体部、201…ディスプレイ、202…キーボード、203…タッチパッド、21…プログラム編集部、211…中間ステップ抽出手段、212…プログラム要素付加手段、22…記憶部、23…通信部、241…コメント欄、242…プルダウンメニュー欄、243…OKボタン、3…モニタ装置、31…表示器、4…バイパス回路、40…ダミーステップ、41…第1のトランジション、42…第2のトランジション、43…バイパス経路、50,51,52,60,61…ラダープログラム、501,601…第1の回路、502,602…第2の回路、610…領域 10: programmable controller, 100: base, 101: power supply module, 102: CPU module, 103: communication module, 104: output module, 105: input module, 12: facility (control target device), 121: actuator, 122: sensor 13, operation panel 130, monitor device 130a, display device 131, each piece selection switch 132, operation preparation switch 133, activation switch 134, execution switch 135, emergency stop switch 141, 142 communication cable 2: control program editing apparatus 20: body part 201: display 202: keyboard 203: touch pad 21: program editing part 211: intermediate step extracting means 212: program element adding means 22: storage part , 23 ... communication unit, 2 DESCRIPTION OF SYMBOLS 1 ... Comment column, 242 ... Pull-down menu column 243 ... OK button, 3 ... Monitor apparatus, 31 ... Display, 4 ... Bypass circuit, 40 ... Dummy step, 41 ... 1st transition, 42 ... 2nd transition, 43 ... bypass path, 50, 51, 52, 60, 61 ... ladder program, 501, 601 ... first circuit, 502, 602 ... second circuit, 610 ... area

Claims (3)

制御対象機器を制御するプログラマブルコントローラで実行可能な制御プログラムを編集するプログラム編集部、及び前記プログラム編集部で編集される制御プログラムを記憶する記憶部を有する制御プログラムの編集装置であって、
前記制御プログラムは、前記制御対象機器の動作単位毎に設けられる複数のステップ、及び前記複数のステップ間の遷移条件を示す複数のトランジションを含むチャート式プログラムと、前記複数のステップの動作内容、及び前記複数のトランジションの遷移条件を複数の接点及びコイルを含む回路要素によって表したラダープログラムとを有し、
前記プログラム編集部は、
前記複数のステップのうち、前記制御対象機器の可動部を一方向に動作させる順動作ステップと前記可動部を逆方向に操作させる逆動作ステップとの間の中間ステップを抽出する抽出手段と、
前記複数のステップを上流側から下流側に連続して実行する連続運転における前記中間ステップの実行開始後に前記連続運転が途中停止して前記チャート式プログラムを最も上流側のステップから再度実行する際に前記中間ステップの実行を行わせないためのプログラム要素を前記制御プログラムに付加するプログラム要素付加手段とを備えた、
制御プログラムの編集装置。
A control program editing apparatus comprising: a program editing unit that edits a control program executable by a programmable controller that controls a control target device; and a storage unit that stores a control program edited by the program editing unit,
The control program includes: a plurality of steps provided for each operation unit of the control target device; and a chart type program including a plurality of transitions indicating transition conditions between the plurality of steps; operation contents of the plurality of steps; A ladder program representing transition conditions of the plurality of transitions by circuit elements including a plurality of contacts and a coil;
The program editing unit
Extraction means for extracting an intermediate step between a forward operation step of moving the movable part of the device to be controlled in one direction and a reverse operation step of operating the movable part in the reverse direction among the plurality of steps;
When the continuous operation is stopped halfway after the start of the execution of the intermediate step in the continuous operation in which the plurality of steps are continuously performed from the upstream side to the downstream side, and the chart type program is again executed from the most upstream step. Program element adding means for adding a program element for preventing execution of the intermediate step to the control program,
Control program editor.
前記プログラム要素付加手段は、前記プログラム要素として、前記中間ステップの前記チャート式プログラムにおける上流側と下流側とを結ぶバイパス回路、及び前記中間ステップの実行開始後に前記連続運転が途中停止して前記チャート式プログラムを最も上流側のステップから再度実行する場合に前記バイパス回路を有効とするためのトランジションを前記チャート式プログラムに付加する、
請求項1に記載の制御プログラムの編集装置。
The program element addition means includes, as the program element, a bypass circuit connecting the upstream side and the downstream side in the chart-type program of the intermediate step, and the continuous operation is stopped halfway after the start of execution of the intermediate step. Adding a transition to the chart program to make the bypass circuit effective when the formula program is executed again from the most upstream step;
The control program editing apparatus according to claim 1.
前記プログラム要素付加手段は、前記プログラム要素として、前記中間ステップに対応する前記トランジションの前記ラダープログラムに、前記中間ステップの実行を行わせないための回路要素を付加する、
請求項1に記載の制御プログラムの編集装置。
The program element adding means adds, as the program element, a circuit element for preventing the execution of the intermediate step to the ladder program of the transition corresponding to the intermediate step.
The control program editing apparatus according to claim 1.
JP2015102678A 2015-05-20 2015-05-20 Control program editor Active JP6500594B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015102678A JP6500594B2 (en) 2015-05-20 2015-05-20 Control program editor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015102678A JP6500594B2 (en) 2015-05-20 2015-05-20 Control program editor

Publications (2)

Publication Number Publication Date
JP2016218724A JP2016218724A (en) 2016-12-22
JP6500594B2 true JP6500594B2 (en) 2019-04-17

Family

ID=57581165

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015102678A Active JP6500594B2 (en) 2015-05-20 2015-05-20 Control program editor

Country Status (1)

Country Link
JP (1) JP6500594B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002284B (en) * 2018-06-27 2022-09-09 北京全路通信信号研究设计院集团有限公司 Visual interlocking logic implementation method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2527722B2 (en) * 1986-10-23 1996-08-28 株式会社日立製作所 Programmable controller program automatic generation method and apparatus
JP4807511B2 (en) * 2006-10-06 2011-11-02 株式会社ジェイテクト PLC
JP5413589B2 (en) * 2009-10-30 2014-02-12 株式会社日立製作所 Plant monitoring apparatus and plant monitoring method

Also Published As

Publication number Publication date
JP2016218724A (en) 2016-12-22

Similar Documents

Publication Publication Date Title
CN108724223B (en) Robot control device
US20140103853A1 (en) Motor control device
US20100313128A1 (en) System and method for free form comments for a programmable logic controller
CN108349082A (en) Method and computer program for the graphic user interface for generating executor program
KR20100005707A (en) Debug system for diagram of programmable controller, its programming device and its program
CN101479734A (en) Simulation apparatus, method and program
JP2007058368A (en) Collating device for program
JP6500594B2 (en) Control program editor
JP2009297877A (en) Device and method for preparing robot teaching program
WO2014141314A1 (en) Display device and programmable display device
JP6575130B2 (en) Screen information generator
US9971331B2 (en) Monitoring device for programmable controller
JP2012159868A (en) Programming device of programmable logic controller
JP2008276381A (en) Debug system for diagram of programmable controller, programming device therefor and program therefor
JP6742689B2 (en) Operation program editing device and program
JP6657597B2 (en) Control program editing device
JP6549378B2 (en) Programmable controller monitoring device
JP2011022838A (en) Debug device and ladder program verification method
JP6474253B2 (en) Display system
JP2012125889A (en) Robot system
JP6132675B2 (en) Plant operation monitoring device
JP2005122597A (en) Display device of nc machine tool
JP2020177485A (en) Operation history recording method of programmable controller and sequence program
JP6381817B2 (en) Control program automatic generation system
JP3454921B2 (en) Plant monitoring and control system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180328

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190220

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190304

R150 Certificate of patent or registration of utility model

Ref document number: 6500594

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150