JP2017084321A - Sequence control device - Google Patents

Sequence control device Download PDF

Info

Publication number
JP2017084321A
JP2017084321A JP2016054501A JP2016054501A JP2017084321A JP 2017084321 A JP2017084321 A JP 2017084321A JP 2016054501 A JP2016054501 A JP 2016054501A JP 2016054501 A JP2016054501 A JP 2016054501A JP 2017084321 A JP2017084321 A JP 2017084321A
Authority
JP
Japan
Prior art keywords
sequence
event
input unit
control device
setting
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.)
Pending
Application number
JP2016054501A
Other languages
Japanese (ja)
Inventor
洋平 新妻
Yohei Niizuma
洋平 新妻
育久 岡本
Ikuhisa Okamoto
育久 岡本
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Publication of JP2017084321A publication Critical patent/JP2017084321A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To easily achieve sequence control without requiring a special sequence description format and high-level knowledge of electricity and software.SOLUTION: A sequence control device comprises: a sequence input part 202 that receives an input of data in a predefined format that specifies a sequential logic indicating the timing of the start or stop of operations of a plurality of control objects; a setting input part 200 that receives an input of settings at least to the operations of the plurality of control objects; a sequence execution part 304 that analyzes the sequential logic on the basis of the data received by the sequence input part and starts or stops the operations of the plurality of control objects at a timing according to the sequential logic; and a driving part 306 that drives the plurality of respective control objects according to the input of settings received by the setting input part at a timing at which the sequence execution part starts the operations.SELECTED DRAWING: Figure 1

Description

本発明は、シーケンス制御装置に関する。   The present invention relates to a sequence control device.

シーケンス制御を実現する手段として、PLC(プログラマブル・ロジック・コントローラ)が広く知られている。従来、PLCを用いて機械的な機構の動作を確認するプロトタイプを作成する場合、モータの駆動制御の知識や、チャタリングなどによる誤動作を防止するための知識が必要であった。また、シーケンスを記述する場合、ラダー回路、ファンクションブロック図(FBD)、又はシーケンシャルファンクションチャート(SFC)などの記述形式の知識も必要であった。   A PLC (programmable logic controller) is widely known as means for realizing sequence control. Conventionally, when creating a prototype for confirming the operation of a mechanical mechanism using a PLC, knowledge of motor drive control and knowledge for preventing malfunction due to chattering and the like have been required. In addition, when describing a sequence, knowledge of a description format such as a ladder circuit, a function block diagram (FBD), or a sequential function chart (SFC) is also required.

シーケンスプログラムの作成を簡単化するものとして、例えば、特許文献1には、移行条件を表形式で記述した出力定義シートを作成し、インタロックが発生した時の異常処理の指定を表形式で記述したインタロック定義シートを作成して、コントローラが実行可能な形式のバイナリーデータに変換するプログラム仕様書作成装置が開示されている。   To simplify the creation of sequence programs, for example, in Patent Document 1, an output definition sheet in which transition conditions are described in a table format is created, and specification of abnormal processing when an interlock occurs is described in a table format. A program specification creation device that creates an interlock definition sheet and converts it into binary data that can be executed by a controller is disclosed.

しかしながら、従来は、特殊なシーケンス記述形式が必要となる場合や、高度な電気及びソフトウェアの知識が必要となる場合があった。   Conventionally, however, a special sequence description format may be required, or advanced electrical and software knowledge may be required.

本発明は、上記に鑑みてなされたものであって、特殊なシーケンス記述形式や、高度な電気及びソフトウェアの知識を必要とすることなく、容易にシーケンス制御を実現することができるシーケンス制御装置を提供することを目的とする。   The present invention has been made in view of the above, and provides a sequence control apparatus that can easily realize sequence control without requiring a special sequence description format or advanced knowledge of electricity and software. The purpose is to provide.

上述した課題を解決し、目的を達成するために、本発明は、複数の制御対象それぞれの動作の開始又は停止のタイミングを示す順序論理を特定する予め定められた形式のデータの入力を受入れるシーケンス入力部と、前記複数の制御対象それぞれの少なくとも動作に対する設定入力を受入れる設定入力部と、前記シーケンス入力部が受入れた前記データに基づいて前記順序論理を解釈し、前記順序論理に応じたタイミングで前記複数の制御対象それぞれの動作を開始又は停止させる処理をそれぞれイベントとして実行するシーケンス実行部と、前記シーケンス実行部が動作を開始させたタイミングで、前記設定入力部が受入れた前記設定入力に応じて、前記複数の制御対象をそれぞれ駆動する駆動部と、を有する。   In order to solve the above-described problems and achieve the object, the present invention is a sequence for accepting input of data in a predetermined format that specifies the order logic indicating the start or stop timing of the operation of each of the plurality of control objects. An input unit, a setting input unit that accepts a setting input for at least the operation of each of the plurality of control objects, and interprets the sequential logic based on the data received by the sequence input unit, and at a timing according to the sequential logic. In response to the setting input received by the setting input unit at a timing at which the sequence execution unit starts the operation, and a sequence execution unit that executes a process for starting or stopping the operation of each of the plurality of control objects. And a drive unit that drives each of the plurality of control objects.

本発明によれば、特殊なシーケンス記述形式や、高度な電気及びソフトウェアの知識を必要とすることなく、容易にシーケンス制御を実現することができるという効果を奏する。   According to the present invention, there is an effect that sequence control can be easily realized without requiring a special sequence description format or advanced knowledge of electricity and software.

図1は、実施形態にかかるシーケンス制御装置の構成例を示すブロック図である。FIG. 1 is a block diagram illustrating a configuration example of a sequence control device according to the embodiment. 図2は、設定入力部が受入れる設定の種類を例示する図である。FIG. 2 is a diagram exemplifying types of settings accepted by the setting input unit. 図3は、タイマ設定の詳細設定例を示す図である。FIG. 3 is a diagram illustrating a detailed setting example of the timer setting. 図4は、STM設定の詳細設定例を示す図である。FIG. 4 is a diagram illustrating a detailed setting example of the STM setting. 図5は、STM設定に対するパルステーブルの詳細設定例を示す図である。FIG. 5 is a diagram illustrating a detailed setting example of the pulse table for the STM setting. 図6は、DCSM設定の詳細設定例を示す図である。FIG. 6 is a diagram illustrating a detailed setting example of the DCSM setting. 図7は、センサ設定の詳細設定例を示す図である。FIG. 7 is a diagram illustrating a detailed setting example of the sensor setting. 図8は、出力ポート設定の詳細設定例を示す図である。FIG. 8 is a diagram illustrating a detailed setting example of the output port setting. 図9は、シーケンス入力部における入力の第1例を示す図である。FIG. 9 is a diagram illustrating a first example of input in the sequence input unit. 図10は、シーケンス入力部における実行条件の入力例を示す図である。FIG. 10 is a diagram illustrating an example of execution condition input in the sequence input unit. 図11は、変換部及び通信部の機能を実行させるアプリケーションの表示例を示す図である。FIG. 11 is a diagram illustrating a display example of an application for executing the functions of the conversion unit and the communication unit. 図12は、シーケンス制御装置が行う制御の種類と、制御それぞれの機能の概要を示す図である。FIG. 12 is a diagram illustrating the types of control performed by the sequence control device and an overview of the functions of each control. 図13は、サブモジュール関連のイベントと終端イベントのデータの内容を示す図である。FIG. 13 is a diagram showing the contents of submodule related events and termination event data. 図14は、イベントごとに適用される次行開始タイミングの情報の定義を示す図である。FIG. 14 is a diagram showing a definition of next row start timing information applied for each event. 図15は、トリガの処理を示すフローチャートである。FIG. 15 is a flowchart showing trigger processing. 図16は、トリガの状態遷移を示す図である。FIG. 16 is a diagram illustrating trigger state transition. 図17は、サブモジュールトリガの処理を示すフローチャートである。FIG. 17 is a flowchart showing the sub-module trigger process. 図18は、サブモジュールトリガの状態遷移を示す図である。FIG. 18 is a diagram illustrating state transition of the submodule trigger. 図19は、通常のイベントの処理を示すフローチャートである。FIG. 19 is a flowchart showing normal event processing. 図20は、通常のイベントの状態遷移を示す図である。FIG. 20 is a diagram illustrating a state transition of a normal event. 図21は、サブモジュールイベントの処理を示すフローチャートである。FIG. 21 is a flowchart showing the processing of the submodule event. 図22は、サブモジュールイベントの状態遷移を示す図である。FIG. 22 is a diagram illustrating state transition of a submodule event. 図23は、サブモジュール完了イベントの処理を示すフローチャートである。FIG. 23 is a flowchart showing processing of a submodule completion event. 図24は、サブモジュール完了イベントの状態遷移を示す図である。FIG. 24 is a diagram showing the state transition of the submodule completion event. 図25は、終端イベントの処理を示す図である。FIG. 25 is a diagram illustrating processing of a termination event. 図26は、終端イベントの状態遷移を示す図である。FIG. 26 is a diagram illustrating state transition of a termination event. 図27は、シーケンス入力部における入力の第2例を示す図である。FIG. 27 is a diagram illustrating a second example of input in the sequence input unit. 図28は、シーケンス入力部における入力の第3例を示す図である。FIG. 28 is a diagram illustrating a third example of input in the sequence input unit. 図29は、重ねた分岐から元の復帰先に戻る過程を示す図である。FIG. 29 is a diagram illustrating a process of returning from the overlapped branch to the original return destination. 図30は、図29に示した分岐の処理においてシーケンス実行部が保持すべき復帰先の第1例を示す図である。FIG. 30 is a diagram illustrating a first example of a return destination that should be held by the sequence execution unit in the branch processing illustrated in FIG. 29. 図31は、図29に示した分岐の処理においてシーケンス実行部が保持すべき復帰先の第2例を示す図である。FIG. 31 is a diagram illustrating a second example of a return destination that should be held by the sequence execution unit in the branch processing illustrated in FIG. 29. 図32は、シーケンス実行部が保持すべき復帰先の第2例における動作例示範囲を示す図である。FIG. 32 is a diagram illustrating an exemplary operation range in the second example of the return destination that should be held by the sequence execution unit. 図33は、図32に示した動作例示範囲に対してシーケンス実行部が行う記憶領域の制御を模式的に示す図である。FIG. 33 is a diagram schematically illustrating storage area control performed by the sequence execution unit with respect to the exemplary operation range illustrated in FIG. 32. 図34は、シーケンス制御装置の適用例を示す図である。FIG. 34 is a diagram illustrating an application example of the sequence control device.

以下に添付図面を参照して、シーケンス制御装置の実施形態を詳細に説明する。図1は、実施形態にかかるシーケンス制御装置10の構成例を示すブロック図である。図1に示すように、シーケンス制御装置10は、例えばPC(Personal Computer)20及び制御装置30を備え、機構部50に対してシーケンス制御を行う。   Hereinafter, an embodiment of a sequence control device will be described in detail with reference to the accompanying drawings. FIG. 1 is a block diagram illustrating a configuration example of a sequence control device 10 according to the embodiment. As illustrated in FIG. 1, the sequence control device 10 includes, for example, a PC (Personal Computer) 20 and a control device 30, and performs sequence control on the mechanism unit 50.

機構部50は、例えばステッピングモータ(STM)500、DCサーボモータ(DCSM)502、センサ(SN)504、入出力ポート(I/O:出力ポート)506、及びタイマ(Timer)508などの複数の制御対象を備え、機械的な動作を行う。機構部50は、任意の種類と個数の制御対象が設けられる。図1においては、ステッピングモータ500、DCサーボモータ502、センサ504、入出力ポート506及びタイマ508の各制御対象がそれぞれ1つずつ記載されているが、機構部50には同じ種類の制御対象がそれぞれ複数設けられているものとする。なお、タイマ508は、物理的には制御装置30内に含まれてもよい。   The mechanism unit 50 includes, for example, a stepping motor (STM) 500, a DC servo motor (DCSM) 502, a sensor (SN) 504, an input / output port (I / O: output port) 506, a timer (Timer) 508, and the like. It has a controlled object and performs mechanical operations. The mechanism unit 50 is provided with an arbitrary type and number of controlled objects. In FIG. 1, the control objects of the stepping motor 500, the DC servo motor 502, the sensor 504, the input / output port 506, and the timer 508 are shown one by one. It is assumed that a plurality of each is provided. Note that the timer 508 may be physically included in the control device 30.

PC20は、CPU、記憶装置、キーボード及びマウスなどの入力装置、及びLCDパネルなどの表示装置を備えた汎用のコンピュータである。また、PC20は、設定入力部200、シーケンス入力部202、変換部204及び通信部206などの機能を有する。   The PC 20 is a general-purpose computer including a CPU, a storage device, input devices such as a keyboard and a mouse, and a display device such as an LCD panel. The PC 20 has functions such as a setting input unit 200, a sequence input unit 202, a conversion unit 204, and a communication unit 206.

設定入力部200は、機構部50が備える複数の制御対象それぞれに対し、ユーザ(利用者)によるパラメータなどの設定を表形式で受入れる。具体的には、設定入力部200は、例えばExcel(登録商標)などの表計算ソフトを介して、機構部50が備える複数の制御対象それぞれの少なくとも動作に対する設定入力を表形式で受入れる。設定入力部200は、制御対象の種類に応じて、設定可能なパラメータが定義されている。また、設定入力部200が受入れた設定の中で、制御対象に対する項目を示す設定はシーケンス入力部202において選択可能に表示され、制御対象に対する設定値などは駆動部306に反映される。   The setting input unit 200 accepts settings such as parameters by a user (user) in a tabular format for each of a plurality of control objects included in the mechanism unit 50. Specifically, the setting input unit 200 accepts, in a table format, setting input for at least the operation of each of the plurality of control objects provided in the mechanism unit 50 via spreadsheet software such as Excel (registered trademark). The setting input unit 200 defines parameters that can be set in accordance with the type of control target. Among the settings received by the setting input unit 200, settings indicating items for the control target are displayed in a selectable manner in the sequence input unit 202, and setting values for the control target are reflected in the drive unit 306.

シーケンス入力部202は、機構部50が備える複数の制御対象それぞれの動作の開始又は停止のタイミングを示す順序論理を特定する予め定められた形式のデータの入力を表形式で受入れる。具体的には、シーケンス入力部202は、図9を用いて後述するように、例えばExcel(登録商標)などの表計算ソフトを介して、イベントごとにユーザが任意の順序で配列させたデータの入力を受入れる。   The sequence input unit 202 accepts input of data in a predetermined format that specifies the order logic indicating the start or stop timing of the operation of each of the plurality of control objects provided in the mechanism unit 50 in a table format. Specifically, as will be described later with reference to FIG. 9, the sequence input unit 202 uses a spreadsheet software such as Excel (registered trademark), for example, for data arranged by the user in any order for each event. Accept input.

シーケンス入力部202は、表計算ソフト上の行ごとに制御のイベントを示すデータを受入れる。ここで、上側の行のイベントから下側の行のイベントへ順次に動作させることが順序制御の基準となっている。また、表計算ソフト上の列では、イベントごとに時限制御(待ち条件)及び条件制御(実行条件)が設定可能にされている。例えば、シーケンス入力部202は、イベントごとに(表計算ソフト上の行ごとに)、イベント分類、制御対象、動作内容、待ち条件及び実行条件を示すデータを受入れる(図9参照)。   The sequence input unit 202 receives data indicating a control event for each row on the spreadsheet software. Here, the sequence control is based on the sequential operation from the upper row event to the lower row event. In the column on the spreadsheet software, timed control (wait condition) and condition control (execution condition) can be set for each event. For example, the sequence input unit 202 receives data indicating an event classification, a control target, an operation content, a wait condition, and an execution condition for each event (for each row on the spreadsheet software) (see FIG. 9).

変換部204は、設定入力部200が受入れた設定、及びシーケンス入力部202が受入れたデータを、制御装置30が使用できる形式のデータに変換する。通信部206は、制御装置30との間で通信を行うためのインターフェイスであり、変換部204が変換したデータを制御装置30へ送信する。例えば、通信部206は、ケーブル40を介して制御装置30との間でRS232Cなどのシリアル通信を行う。通信部206は、Bluetooth(登録商標)などの無線通信や、SDカード(登録商標)等の記憶メディアによって代替えされてもよい。   The conversion unit 204 converts the settings received by the setting input unit 200 and the data received by the sequence input unit 202 into data in a format that can be used by the control device 30. The communication unit 206 is an interface for performing communication with the control device 30 and transmits the data converted by the conversion unit 204 to the control device 30. For example, the communication unit 206 performs serial communication such as RS232C with the control device 30 via the cable 40. The communication unit 206 may be replaced with a wireless communication such as Bluetooth (registered trademark) or a storage medium such as an SD card (registered trademark).

制御装置30は、通信部300、記憶部302、シーケンス実行部304及び駆動部306を有する。通信部300は、PC20との間で通信を行うためのインターフェイスであり、PC20が送信したデータを受信する。例えば、通信部300は、ケーブル40を介してPC20との間でRS232Cなどのシリアル通信を行う。記憶部302は、通信部300が受信したデータ、及びシーケンス実行部304が処理に用いるデータなどを記憶する。記憶部302は、基板上のRAM領域や記憶メディアであってもよい。   The control device 30 includes a communication unit 300, a storage unit 302, a sequence execution unit 304, and a drive unit 306. The communication unit 300 is an interface for performing communication with the PC 20 and receives data transmitted by the PC 20. For example, the communication unit 300 performs serial communication such as RS232C with the PC 20 via the cable 40. The storage unit 302 stores data received by the communication unit 300, data used by the sequence execution unit 304 for processing, and the like. The storage unit 302 may be a RAM area or a storage medium on the substrate.

シーケンス実行部304は、記憶部302が記憶したデータを読み出し、シーケンス入力部202が受入れたデータに基づいて順序論理を解釈(及び補完)し、解釈した順序論理に応じたタイミングで、機構部50が備える複数の制御対象それぞれの動作を開始又は停止させる処理をそれぞれイベントとして実行する。また、シーケンス実行部304は、イベントを実行するときに用いるデータを保持又は記憶部302に記憶させるが、データを記憶部302に記憶させる制御を記憶制御部308に行わせるように構成されてもよい。   The sequence execution unit 304 reads the data stored in the storage unit 302, interprets (and complements) the order logic based on the data received by the sequence input unit 202, and at a timing according to the interpreted order logic, the mechanism unit 50. A process for starting or stopping the operation of each of the plurality of control objects included in is executed as an event. Further, the sequence execution unit 304 holds or stores data used when executing the event in the storage unit 302, but may be configured to cause the storage control unit 308 to perform control for storing the data in the storage unit 302. Good.

駆動部306は、シーケンス実行部304が動作を開始させたタイミングで、設定入力部200が受入れた設定入力に応じて、機構部50が備える複数の制御対象をそれぞれ駆動する。   The driving unit 306 drives each of the plurality of control objects included in the mechanism unit 50 according to the setting input received by the setting input unit 200 at the timing when the sequence execution unit 304 starts the operation.

次に、設定入力部200についてさらに詳述する。図2は、設定入力部200が受入れる設定の種類(設定項目)を例示する図である。設定入力部200が受入れる設定には、例えばタイマ設定200a、STM設定200b、パルステーブル設定200c、DCSM設定200d、センサ設定200e、及び出力ポート設定200fがある。   Next, the setting input unit 200 will be described in detail. FIG. 2 is a diagram illustrating types of settings (setting items) accepted by the setting input unit 200. The settings accepted by the setting input unit 200 include, for example, timer settings 200a, STM settings 200b, pulse table settings 200c, DCSM settings 200d, sensor settings 200e, and output port settings 200f.

タイマ設定200aは、タイマ508に対する表形式の設定である。STM設定200b及びパルステーブル設定200cは、ステッピングモータ500に対する表形式の設定である。DCSM設定200dは、DCサーボモータ502に対する表形式の設定である。センサ設定200eは、センサ504に対する表形式の設定である。出力ポート設定200fは、入出力ポート506に対する表形式の設定である。   The timer setting 200 a is a tabular setting for the timer 508. The STM setting 200b and the pulse table setting 200c are tabular settings for the stepping motor 500. The DCSM setting 200 d is a tabular setting for the DC servo motor 502. The sensor setting 200e is a tabular setting for the sensor 504. The output port setting 200 f is a tabular setting for the input / output port 506.

図3は、タイマ設定200aの詳細設定例を示す図である。設定入力部200は、シーケンスの実行タイミングやポーリング処理などを行うために必要となるタイマ508に対する設定を入力可能にされている。また、設定入力部200は、シーケンス入力部202においてユーザがタイマ508を扱いやすくするために、タイマ508に対する名称(タイマ名)をユーザが付与して設定できるようにされている。   FIG. 3 is a diagram illustrating a detailed setting example of the timer setting 200a. The setting input unit 200 can input settings for the timer 508 necessary for performing sequence execution timing, polling processing, and the like. The setting input unit 200 is configured so that the user can assign and set a name (timer name) for the timer 508 so that the user can easily handle the timer 508 in the sequence input unit 202.

設定入力部200において、機構部50が備えるタイマ508の個数や周期は、制御装置30が扱うことが可能な範囲であればユーザが任意に設定可能である。設定入力部200が受入れたタイマ名や周期は、制御装置30によってシーケンス制御に用いられる。   In the setting input unit 200, the number and cycle of the timers 508 provided in the mechanism unit 50 can be arbitrarily set by the user as long as the control device 30 can handle them. The timer name and cycle accepted by the setting input unit 200 are used by the control device 30 for sequence control.

また、設定入力部200がタイマ名のみや、周期のみの設定を受入れた場合、シーケンス入力部202及び制御装置30は、未使用のタイマとして扱う。つまり、設定入力部200は、複数の制御対象それぞれに対し、シーケンス入力部202が動作を開始させる対象であるか否かを示す設定入力を受入れる。すると、シーケンス入力部202は、動作を開始させる対象でないことを示す設定入力がなされた制御対象をリストに表示しない。よって、誤ったタイマの使用が防止される。また、設定入力部200は、同名のタイマ名が設定された場合には、どちらのタイマを使用するのかをユーザに問い合わせるダイアログ(通知)を行うように構成されてもよい。この場合、同名によるタイマの誤使用を防止させることが可能である。   In addition, when the setting input unit 200 accepts only the timer name or only the cycle setting, the sequence input unit 202 and the control device 30 handle them as unused timers. That is, the setting input unit 200 accepts a setting input indicating whether or not the sequence input unit 202 is a target for starting an operation for each of a plurality of control targets. Then, the sequence input unit 202 does not display the control target to which the setting input indicating that the operation is not the target to be started is performed in the list. Therefore, use of an incorrect timer is prevented. In addition, when a timer name with the same name is set, the setting input unit 200 may be configured to perform a dialog (notification) inquiring the user which timer is to be used. In this case, it is possible to prevent misuse of the timer with the same name.

図4は、STM設定200bの詳細設定例を示す図である。ユーザは、設定入力部200に対してステッピングモータ500の設定を入力することにより、シーケンス入力部202を介してステッピングモータ500の励磁ON、励磁OFF、駆動開始(速度指定)、駆動開始(PPS指定)、及び停止などの指示を容易に行うことが可能になる。   FIG. 4 is a diagram illustrating a detailed setting example of the STM setting 200b. By inputting the setting of the stepping motor 500 to the setting input unit 200, the user turns on the excitation of the stepping motor 500 via the sequence input unit 202, excitation OFF, drive start (speed designation), and drive start (PPS designation). ), And a stop instruction can be easily performed.

また、設定入力部200は、シーケンス入力部202においてユーザがステッピングモータ500を扱いやすくするために、ステッピングモータ500に対する名称(モータ名)をユーザが設定できるようにされている。   Further, the setting input unit 200 is configured so that the user can set a name (motor name) for the stepping motor 500 so that the user can easily handle the stepping motor 500 in the sequence input unit 202.

図4に示したSTM設定200bの詳細設定例内の制御装置と信号内容は、制御装置30に割り振られているコネクタ番号と、そのコネクタ内のピン毎の信号線を示している。これにより、ユーザは間違えることなく制御装置30とステッピングモータ500とを接続させることができる。   The control device and signal content in the detailed setting example of the STM setting 200b shown in FIG. 4 indicate the connector number assigned to the control device 30 and the signal line for each pin in the connector. Thereby, the user can connect the control device 30 and the stepping motor 500 without making a mistake.

また、設定入力部200は、複数のステッピングモータ500それぞれに対して使用又は未使用をユーザが設定することができるようにされている。設定入力部200において未使用と設定されたステッピングモータ500、又はモータ名が無いステッピングモータ500は、シーケンス入力部202において選択できないようにされ、制御装置30においても使用できないこととなる。つまり、ステッピングモータ500の誤使用が防止される。また、設定入力部200は、機構部50が備えているステッピングモータ500の数を制御装置30から取得し、各ステッピングモータ500に対する表示を行うように構成されてもよい。   In addition, the setting input unit 200 is configured so that the user can set use or non-use for each of the plurality of stepping motors 500. The stepping motor 500 set as unused in the setting input unit 200 or the stepping motor 500 having no motor name cannot be selected in the sequence input unit 202 and cannot be used in the control device 30 as well. That is, misuse of the stepping motor 500 is prevented. Further, the setting input unit 200 may be configured to acquire the number of stepping motors 500 provided in the mechanism unit 50 from the control device 30 and display the stepping motors 500.

図5は、STM設定200bに対するパルステーブルの詳細設定例を示す図である。設定入力部200は、各ステッピングモータ500に対する駆動パルステーブルも設定することができるようにされている。パルステーブルの設定では、ステッピングモータ500の励磁方式を2相励磁、1−2相励磁、W1−2相励磁、2W1−2相励磁から選択して決定することができるようにされている。   FIG. 5 is a diagram illustrating a detailed setting example of a pulse table for the STM setting 200b. The setting input unit 200 can also set a driving pulse table for each stepping motor 500. In the setting of the pulse table, the excitation method of the stepping motor 500 can be selected and determined from 2-phase excitation, 1-2 phase excitation, W1-2 phase excitation, and 2W1-2 phase excitation.

また、設定入力部200は、速度[mm/s]からPPS[pulse/s]の変換を行うための変換定数を設定することが可能にされている。従って、ステッピングモータ500に対して速度指定で駆動指示がなされても、シーケンス制御装置10は、速度をPPSに変換してステッピングモータ500を駆動させることができる。   The setting input unit 200 is capable of setting a conversion constant for performing conversion from speed [mm / s] to PPS [pulse / s]. Therefore, even if a driving instruction is given to the stepping motor 500 by specifying the speed, the sequence control device 10 can drive the stepping motor 500 by converting the speed to PPS.

なお、図5(a)に示されたパルステーブルNoは、パルステーブル毎に設定されている通し番号であり、シーケンス入力部202においてステッピングモータ500を動作させるためにどのテーブルを使用するかをパルステーブルNoの指定によって行うことを可能にしている。図5(b)に示したパルステーブルは、ステップ数、時間、PPS及び速度の項目が設けられており、少なくともステップ毎のPPSの情報を含んでいる。   Note that the pulse table No. shown in FIG. 5A is a serial number set for each pulse table, and the pulse table indicates which table is used to operate the stepping motor 500 in the sequence input unit 202. This can be done by specifying No. The pulse table shown in FIG. 5B is provided with items of step number, time, PPS, and speed, and includes at least information on PPS for each step.

また、設定できるパルステーブル数及び各パルステーブルのステップ数は、制御装置30の許容範囲内であればよく、ユーザが任意に設定可能にされている。なお、制御装置30の記憶部302が記憶するデータ量を削減するために、例えばパルステーブル内に設定されていても、シーケンス入力部202によって使用を指示されていないパルステーブルは、例えば変換部204が未使用と判断し、制御装置30へは送信されない。   The number of pulse tables that can be set and the number of steps of each pulse table need only be within the allowable range of the control device 30 and can be arbitrarily set by the user. In order to reduce the amount of data stored in the storage unit 302 of the control device 30, for example, a pulse table that is set in the pulse table but not instructed to be used by the sequence input unit 202 is, for example, the conversion unit 204. Is not used, and is not transmitted to the control device 30.

図6は、DCSM設定200dの詳細設定例を示す図である。ユーザは、設定入力部200に対してDCサーボモータ502の設定を入力することにより、シーケンス入力部202を介してDCサーボモータ502の回転開始、速度変更、停止(フリー)、停止(位置ホールド)、停止(ブレーキ)、即断などの指示を容易に行うことが可能になる。   FIG. 6 is a diagram illustrating a detailed setting example of the DCSM setting 200d. The user inputs the setting of the DC servo motor 502 to the setting input unit 200 to start rotation, change speed, stop (free), stop (position hold) of the DC servo motor 502 via the sequence input unit 202. It is possible to easily give instructions such as stop (brake) and immediate interruption.

また、設定入力部200は、シーケンス入力部202においてユーザがDCサーボモータ502を扱いやすくするために、DCサーボモータ502に対する名称(モータ名)をユーザが設定できるようにされている。   The setting input unit 200 is configured so that the user can set a name (motor name) for the DC servo motor 502 so that the user can easily handle the DC servo motor 502 in the sequence input unit 202.

図6に示したDCSM設定200dの詳細設定例内の制御装置と信号内容は、制御装置30に割り振られているコネクタ番号と、そのコネクタ内のピン毎の信号線を示している。これにより、ユーザは間違えることなく制御装置30とDCサーボモータ502とを接続させることができる。   The control device and signal contents in the detailed setting example of the DCSM setting 200d shown in FIG. 6 indicate the connector number allocated to the control device 30 and the signal line for each pin in the connector. Thereby, the user can connect the control device 30 and the DC servo motor 502 without making a mistake.

また、設定入力部200は、複数のDCサーボモータ502それぞれに対して使用又は未使用をユーザが設定することができるようにされている。設定入力部200において未使用と設定されたDCサーボモータ502、又はモータ名が無いDCサーボモータ502は、シーケンス入力部202において選択できないようにされ、制御装置30においても使用できないこととなる。つまり、DCサーボモータ502の誤使用が防止される。   Further, the setting input unit 200 is configured so that the user can set use or non-use for each of the plurality of DC servo motors 502. The DC servo motor 502 set as unused in the setting input unit 200 or the DC servo motor 502 having no motor name cannot be selected in the sequence input unit 202 and cannot be used in the control device 30. That is, misuse of the DC servo motor 502 is prevented.

また、設定入力部200は、シーケンス入力部202によってDCサーボモータ502の動作指示が出されたときに、加速度[pps^2]が指示されていない場合に使用するデフォルトの加速度をCW回転とCCW回転それぞれに設定可能にされている。また、設定入力部200は、シーケンス入力部202におけるDCサーボモータ502の回転指示を速度[mm/s]指定かPPS[pulse/s]のいずれかを選択することを可能にする。ここで、設定入力部200は、速度を指定された場合にPPSへ変換するための変換定数を設定することを可能にされている。この変換定数は、回転方向毎に違う機構を動作させることにも対応させるため、回転方向毎に設定できるようにされている。また、設定入力部200は、機構部50が備えているDCサーボモータ502の数を制御装置30から取得し、各DCサーボモータ502に対する表示を行うように構成されてもよい。   The setting input unit 200 sets the default acceleration to be used when the acceleration [pps ^ 2] is not instructed when the sequence input unit 202 instructs to operate the DC servo motor 502 to the CW rotation and CCW. Each rotation can be set. In addition, the setting input unit 200 makes it possible to select either speed [mm / s] designation or PPS [pulse / s] as an instruction to rotate the DC servo motor 502 in the sequence input unit 202. Here, the setting input unit 200 is capable of setting a conversion constant for converting to PPS when a speed is designated. This conversion constant can be set for each rotation direction in order to cope with the operation of a mechanism different for each rotation direction. Further, the setting input unit 200 may be configured to acquire the number of DC servo motors 502 provided in the mechanism unit 50 from the control device 30 and display the DC servo motors 502.

図7は、センサ設定200eの詳細設定例を示す図である。設定入力部200は、センサ504に対する設定を受入れる。そして、ユーザは、シーケンス入力部202を介してセンサ504のON/OFFのイベントトリガや、センサ504のON/OFF待ちを入力することが可能になる。   FIG. 7 is a diagram illustrating a detailed setting example of the sensor setting 200e. The setting input unit 200 accepts settings for the sensor 504. Then, the user can input an ON / OFF event trigger for the sensor 504 and an ON / OFF wait for the sensor 504 via the sequence input unit 202.

特に、センサ504は、チャタリングに起因する誤動作を防止する処理が必要となる場合が多い。そこで、設定入力部200は、タイマ設定でユーザが指定した周期のタイマの指定と、センサ信号のHighを確定とする読取回数、及びセンサ信号のLowを確定とする読取回数と、センサ504がONの状態の定義(High信号でONの場合はH、Low信号でONの場合はLを設定)を行うことが可能にされている。これにより、ユーザは、チャタリングの影響を意識することなく、シーケンス入力部202を介して容易にセンサ504のON/OFFを指示することが可能になっている。   In particular, the sensor 504 often requires processing for preventing malfunction caused by chattering. Therefore, the setting input unit 200 specifies the timer of the period specified by the user in the timer setting, the number of readings for determining the high level of the sensor signal, the number of readings for determining the low level of the sensor signal, and the sensor 504 ON. Can be defined (when the High signal is ON, H is set, and when the Low signal is ON, L is set). Thus, the user can easily instruct ON / OFF of the sensor 504 via the sequence input unit 202 without being aware of the influence of chattering.

また、設定入力部200は、シーケンス入力部202においてユーザがセンサ504を扱いやすくするために、センサ504に対する名称(センサ名)をユーザが設定できるようにされている。   The setting input unit 200 is configured so that the user can set a name (sensor name) for the sensor 504 so that the user can easily handle the sensor 504 in the sequence input unit 202.

図7に示したセンサ設定200eの詳細設定例内の制御装置と信号内容は、制御装置30に割り振られているコネクタ番号と、そのコネクタ内のピン毎の信号線を示している。これにより、ユーザは間違えることなく制御装置30とセンサ504とを接続させることができる。   The control device and signal content in the detailed setting example of the sensor setting 200e shown in FIG. 7 indicate the connector number assigned to the control device 30 and the signal line for each pin in the connector. Thereby, the user can connect the control apparatus 30 and the sensor 504 without making a mistake.

また、設定入力部200は、複数のセンサ504それぞれに対して使用又は未使用をユーザが設定することができるようにされている。設定入力部200において未使用と設定されたセンサ504、又はセンサ名が無いセンサ504は、シーケンス入力部202において選択できないようにされ、制御装置30においても使用できないこととなる。つまり、センサ504の誤使用が防止される。また、設定入力部200は、機構部50が備えているセンサ504の数を制御装置30から取得し、各センサ504に対する表示を行うように構成されてもよい。   Further, the setting input unit 200 is configured so that the user can set use or non-use for each of the plurality of sensors 504. The sensor 504 set as unused in the setting input unit 200 or the sensor 504 having no sensor name cannot be selected in the sequence input unit 202 and cannot be used in the control device 30. That is, misuse of the sensor 504 is prevented. Further, the setting input unit 200 may be configured to acquire the number of sensors 504 provided in the mechanism unit 50 from the control device 30 and perform display on each sensor 504.

図8は、出力ポート設定200fの詳細設定例を示す図である。機構部50には、モータなどのほかに、ソレノイドなどの駆動装置や、現在の状態を表示するなどの目的でLEDなどの機器が設けられる場合がある。これらは、入出力ポート506から出力されるON/OFF信号で動作する。ユーザは、設定入力部200に対して入出力ポート506の設定を入力することにより、シーケンス入力部202を介して入出力ポート506に接続された機器(構成)に対する指示を容易に行うことが可能になる。   FIG. 8 is a diagram illustrating a detailed setting example of the output port setting 200f. In addition to the motor or the like, the mechanism unit 50 may be provided with a drive device such as a solenoid or a device such as an LED for the purpose of displaying the current state. These operate by an ON / OFF signal output from the input / output port 506. The user can easily instruct the device (configuration) connected to the input / output port 506 via the sequence input unit 202 by inputting the setting of the input / output port 506 to the setting input unit 200. become.

特に、入出力ポート506に接続される機器(ソレノイド、LED)などは、アクティブ方向(ON)の状態を示す信号がHighの状態の場合(アクティブHigh)と、Lowの状態の場合(アクティブLow)とがある。設定入力部200によって入出力ポート506に接続された機器ごとにアクティブ方向が設定されると、ユーザは、シーケンス入力部202において信号の状態を意識することなく機器の動作を指示することが可能となる。また、シーケンス入力部202によって初期状態が指定されると、入出力ポート506に接続された機器をシーケンス開始時に同じ状態へ戻すように設定することも可能である。   In particular, devices (solenoid, LED) connected to the input / output port 506 have a signal indicating the active direction (ON) in a high state (active high) and a low state (active low). There is. When the active direction is set for each device connected to the input / output port 506 by the setting input unit 200, the user can instruct the operation of the device without being aware of the signal state in the sequence input unit 202. Become. When the initial state is specified by the sequence input unit 202, it is possible to set the device connected to the input / output port 506 to return to the same state at the start of the sequence.

また、設定入力部200は、シーケンス入力部202においてユーザが入出力ポート506を扱いやすくするために、入出力ポート506に対する名称(機器の機能名)をユーザが設定できるようにされている。   The setting input unit 200 is configured so that the user can set a name (function name of the device) for the input / output port 506 so that the user can easily handle the input / output port 506 in the sequence input unit 202.

図8に示した出力ポート設定200fの詳細設定例内の制御装置と信号内容は、制御装置30に割り振られているコネクタ番号と、そのコネクタ内のピン毎の信号線を示している。これにより、ユーザは間違えることなく制御装置30と入出力ポート506に接続された機器とを接続させることができる。   The control device and signal content in the detailed setting example of the output port setting 200f shown in FIG. 8 indicate the connector number assigned to the control device 30 and the signal line for each pin in the connector. As a result, the user can connect the control device 30 and the device connected to the input / output port 506 without making a mistake.

また、設定入力部200は、複数の入出力ポート506それぞれに対して使用又は未使用をユーザが設定することができるようにされている。設定入力部200において未使用と設定された入出力ポート506、又は機能名が無い入出力ポート506は、シーケンス入力部202において選択できないようにされ、制御装置30においても使用できないこととなる。つまり、入出力ポート506の誤使用が防止される。また、設定入力部200は、機構部50が備えている入出力ポート506に接続された機器の数を制御装置30から取得し、各入出力ポート506に対する表示を行うように構成されてもよい。   Further, the setting input unit 200 is configured so that the user can set use or non-use for each of the plurality of input / output ports 506. The input / output port 506 set as unused in the setting input unit 200 or the input / output port 506 having no function name cannot be selected in the sequence input unit 202 and cannot be used in the control device 30. That is, misuse of the input / output port 506 is prevented. Further, the setting input unit 200 may be configured to acquire the number of devices connected to the input / output port 506 provided in the mechanism unit 50 from the control device 30 and display the input / output port 506. .

次に、シーケンス入力部202における入力の第1例について説明する。図9は、シーケンス入力部202における入力の第1例を示す図である。シーケンス入力部202は、表計算ソフトのスプレッドシート(Spreadsheet)60の行ごとに制御のイベントを示すデータを受入れる。   Next, a first example of input in the sequence input unit 202 will be described. FIG. 9 is a diagram illustrating a first example of input in the sequence input unit 202. The sequence input unit 202 accepts data indicating a control event for each row of a spreadsheet 60 of spreadsheet software.

シーケンス入力部202に入力される各イベントは、イベント分類61、制御対象62、動作内容63、待ち条件64及び実行条件65がスプレッドシート60の列に入力されるようになっている。イベント分類61は、各イベントがどの種類に分類されるかを示す。制御対象62は、機構部50が備える制御対象の1つを示す。動作内容63は、制御対象の具体的動作を示す。待ち条件64は、時限制御の条件を示す。実行条件65は、条件制御の条件を示す。   For each event input to the sequence input unit 202, an event classification 61, a control target 62, an operation content 63, a waiting condition 64, and an execution condition 65 are input to the column of the spreadsheet 60. The event classification 61 indicates to which type each event is classified. The control object 62 indicates one of the control objects included in the mechanism unit 50. The operation content 63 indicates a specific operation to be controlled. The waiting condition 64 indicates a condition for timed control. The execution condition 65 indicates a condition control condition.

シーケンスは、イベント(行)の組み合わせで表現されている。よって、トリガから順次下の行に向かってイベントが実行されることにより、シーケンス制御が実現される。トリガを含む各イベントは、ユーザが任意に順序を設定可能にされている。   A sequence is expressed by a combination of events (rows). Therefore, sequence control is realized by executing events sequentially from the trigger toward the lower row. Each event including a trigger can be arbitrarily set by the user.

シーケンス入力部202は、左側の列から順に入力するようにされている。シーケンス入力部202は、表の中の入力マスがクリックされると、入力マス内で選択可能な項目がリスト化されるようになっている。具体的には、シーケンス入力部202は、設定入力部200が受入れた設定入力により付与される名称を用いて、設定可能な項目をリストにして表示する。ユーザが入力マス内で項目を選択すると、選択された項目の入力(設定)が決定される。   The sequence input unit 202 inputs in order from the left column. When an input cell in the table is clicked, the sequence input unit 202 lists items that can be selected in the input cell. Specifically, the sequence input unit 202 displays a list of settable items using a name given by the setting input accepted by the setting input unit 200. When the user selects an item in the input cell, input (setting) of the selected item is determined.

具体的には、イベント分類61において、予め定められたイベントの種類の中から1つのイベントの分類が選択されると、制御対象62に対する選択による入力が可能になるようにされている。イベント分類61において選択可能な項目は、シーケンス開始のきっかけとなるトリガとしてのタイマトリガ、センサトリガ、サブモジュールトリガなどと、ステッピングモータ500の制御、DCサーボモータ502の制御、センサ504の制御、入出力ポート506の制御、タイマ508の制御、サブモジュール制御、変数制御などがある。選択可能な項目は、設定に応じて追加されてもよい。   Specifically, in the event classification 61, when one event classification is selected from predetermined event types, input to the control object 62 by selection is enabled. Items that can be selected in the event classification 61 include timer triggers, sensor triggers, submodule triggers, and the like as triggers that trigger the start of a sequence, stepping motor 500 control, DC servo motor 502 control, sensor 504 control, and input / output. There are control of port 506, control of timer 508, submodule control, variable control, and the like. Selectable items may be added according to the setting.

続いて制御対象62のマスがクリックされると、イベント分類61で選択された項目に応じて選択可能(設定可能)となる項目がリスト化されて表示される。ユーザがリストによって項目の選択を促されて入力マス内で項目を選択すると、選択された項目の制御対象が決定される。例えば、イベント分類61でステッピングモータ500の制御が選択された場合、設定入力部200のSTM設定200bの詳細設定例のように設定されたモータ名がリストに表示される。   Subsequently, when a square of the control target 62 is clicked, items that can be selected (settable) according to the item selected in the event classification 61 are listed and displayed. When the user is prompted to select an item by the list and selects an item in the input cell, the control target of the selected item is determined. For example, when the control of the stepping motor 500 is selected in the event classification 61, the motor names set as in the detailed setting example of the STM setting 200b of the setting input unit 200 are displayed in the list.

次に、動作内容63のマスがクリックされると、イベント分類61及び制御対象62の組合せで選択可能な動作の一覧がリストとして表示される。ユーザが入力マス内で項目を選択すると、選択された項目の動作内容が決定される。   Next, when a square of the action content 63 is clicked, a list of actions that can be selected by a combination of the event classification 61 and the control target 62 is displayed as a list. When the user selects an item in the input cell, the operation content of the selected item is determined.

なお、設定入力部200は、モータの駆動速度を直接入力して指定する場合など、一部の設定入力については手入力を促すようにマスに色と表示を行い、ユーザの入力を促すように構成されている。この手入力を促す機能は、手入力が必要な全てのマスに適用される。また、入力が必要ない部分は、グレーアウトされて入力できない状態とされており、ユーザの誤入力が防止されている。   Note that the setting input unit 200 displays a color and display on the square so as to prompt manual input for a part of the setting input, for example, when directly specifying the driving speed of the motor, thereby prompting the user to input. It is configured. This function for prompting manual input is applied to all cells requiring manual input. In addition, a portion that does not require input is grayed out and cannot be input, and erroneous input by the user is prevented.

次に、シーケンス入力部202は、動作内容63を行うタイミングとして、待ち条件64において待ち条件の設定を受入れる。待ち条件は、時間待ちとセンサ変化待ちとが設定可能にされている。また、シーケンス入力部202は、イベントを実行する条件を実行条件65において選択されると、実行条件を設定するデータの入力を受入れる。実行条件を満たさない場合には、そこでシーケンスが停止することとなる。なお、実行条件は複数設定することが可能にされている。   Next, the sequence input unit 202 accepts the setting of the waiting condition in the waiting condition 64 as the timing for performing the operation content 63. As waiting conditions, waiting time and waiting for sensor change can be set. In addition, when the condition for executing the event is selected in the execution condition 65, the sequence input unit 202 accepts input of data for setting the execution condition. If the execution condition is not satisfied, the sequence is stopped there. A plurality of execution conditions can be set.

図10は、シーケンス入力部202における実行条件の入力例(定義例)を示す図である。シーケンス入力部202の実行条件65において選択可能に表示される条件は、図10に示したように別途定義されている。ここでは、同じ条件を複数のイベントで指定することが可能になっている。   FIG. 10 is a diagram illustrating an input example (definition example) of an execution condition in the sequence input unit 202. Conditions that can be selected in the execution condition 65 of the sequence input unit 202 are separately defined as shown in FIG. Here, the same condition can be specified by a plurality of events.

実行条件65において実行条件を作成する場合、例えば比較内容が「センサの比較」や「変数の比較」などから選択されることにより、条件の対象が選択される。次に、比較内容として例えば「〜より大きい:>=」などが選択肢中から選択され、比較値が定義されると、シーケンス入力部202は、実行条件を生成する。   When creating an execution condition in the execution condition 65, for example, the target of the condition is selected by selecting the comparison content from “sensor comparison”, “variable comparison”, or the like. Next, for example, “greater than:> =” is selected as the comparison content from the choices, and when the comparison value is defined, the sequence input unit 202 generates an execution condition.

図11は、変換部204及び通信部206の機能を実行させるアプリケーション70の表示例を示す図である。図11に示したアプリケーション70の表示例は、設定入力部200とシーケンス入力部202が受入れたデータを制御装置30が使用できるデータへ変換する機能と、変換したデータを制御装置30へ送信する機能を実行させるUI(ユーザインターフェイス)である。   FIG. 11 is a diagram illustrating a display example of the application 70 that causes the functions of the conversion unit 204 and the communication unit 206 to be executed. The display example of the application 70 illustrated in FIG. 11 includes a function for converting data received by the setting input unit 200 and the sequence input unit 202 into data that can be used by the control device 30, and a function for transmitting the converted data to the control device 30. This is a UI (user interface) for executing

アプリケーション70は、シーケンス入力部202が作成したシーケンスファイルと、設定入力部200が作成したパラメータファイルを読み込み、シーケンスデータ作成ボタンが押下されると、データ変換を実行する。また、アプリケーション70上でPC20上のCOMPORTが操作されて通信接続が行われると、データが制御装置30へ送信される。また、アプリケーション70は、イベントを指定し、イベント分類61、制御対象62、動作内容63、待ち条件64及び実行条件65からなる一連のイベントを後から差し替えることができるようにされてもよい。   The application 70 reads the sequence file created by the sequence input unit 202 and the parameter file created by the setting input unit 200, and executes data conversion when the sequence data creation button is pressed. In addition, when COMPORT on the PC 20 is operated on the application 70 to establish communication connection, data is transmitted to the control device 30. Further, the application 70 may designate an event so that a series of events including the event classification 61, the control target 62, the operation content 63, the waiting condition 64, and the execution condition 65 can be replaced later.

次に、シーケンス制御装置10が有する機能について、さらに詳細に説明する。図12は、シーケンス制御装置10が行う制御の種類と、制御それぞれの機能の概要を示す図である。ここで、シーケンス制御装置10が行う制御は、図9に示した表の構成要素である行(イベント)に相当する。   Next, functions of the sequence control device 10 will be described in more detail. FIG. 12 is a diagram illustrating the types of control performed by the sequence control device 10 and an overview of the functions of the controls. Here, the control performed by the sequence control apparatus 10 corresponds to a row (event) which is a component of the table shown in FIG.

トリガ(各種)は、一連のシーケンスを始めるきっかけの発生を待つ機能であり、図9に示した形式の表の下行以降に書かれた一連のシーケンスを開始するトリガを指定する機能である。アクチュエータ(各種)操作は、制御対象のアクチュエータに対して行う出力指示であり、例えばステッピングモータ制御、DCSM制御、出力ポート制御などの機械部品の出力を行うためのイベントである。   The trigger (various) is a function for waiting for the occurrence of a trigger for starting a series of sequences, and is a function for designating a trigger for starting a series of sequences written after the lower row of the table of the format shown in FIG. Actuator (various) operation is an output instruction given to the actuator to be controlled, and is an event for outputting machine parts such as stepping motor control, DCSM control, and output port control.

タイマ操作は、タイマの計時開始、停止、時間のクリア等を行うイベントである。変数操作は、指定した変数に対して、代入、加算、減算を行うイベントである。   The timer operation is an event for starting, stopping, or clearing the time of the timer. A variable operation is an event that performs substitution, addition, or subtraction on a specified variable.

数行のイベントをまとめてサブルーチン化したシーケンスを定義することを可能にしている。このサブルーチン化したシーケンスをサブモジュール(又は単にサブルーチン)と呼ぶ。サブモジュールトリガは、サブモジュールの先頭となる特殊なイベントであり、サブモジュールを利用するシーケンスは、このサブモジュールトリガを指定することによって呼び出される。サブモジュールイベントは、サブモジュールトリガを指定して呼び出すイベントである。サブモジュール完了イベント(E)は、サブモジュールを終えて、本シーケンスに復帰するイベントである。終端イベント(T)は、何も処理を行わず、そこまで進んだシーケンスを終了させるイベントである。   It is possible to define a sequence that combines several lines of events into a subroutine. This sequence of subroutines is called a submodule (or simply a subroutine). A submodule trigger is a special event at the head of a submodule, and a sequence using a submodule is called by specifying this submodule trigger. A submodule event is an event that is called by specifying a submodule trigger. The submodule completion event (E) is an event for completing the submodule and returning to this sequence. The end event (T) is an event that does not perform any processing and ends the sequence that has been reached.

図13は、サブモジュール関連のイベントと終端イベントのデータの内容を示す図である。サブモジュールトリガ、サブモジュールイベント、サブモジュール完了イベントは、実行条件を持つことができる。また、サブモジュールイベントは、制御対象として分岐先のサブモジュールトリガを利用者が指定できる。また、サブモジュールイベントは、操作内容にサブモジュールから復帰したときに、処理を続けるイベントを指定できる。サブモジュールイベントは、開始から指定されたサブモジュールへの分岐を実行するまで、利用者が指定した待ちを行うことができる。   FIG. 13 is a diagram showing the contents of submodule related events and termination event data. Submodule triggers, submodule events, and submodule completion events can have execution conditions. In addition, for a submodule event, a user can specify a branch destination submodule trigger as a control target. The submodule event can specify an event to continue processing when the operation content returns from the submodule. The submodule event can wait for the user to specify until the branch from the start to the specified submodule is executed.

図14は、イベントごとに適用される次行開始タイミングの情報の定義を示す図である。特殊なイベントを除き、イベントは開始されると、準備、待ち、そして実行と状態を進める。それぞれのイベントのフローと状態遷移については後述する。次行(次イベント)は、状態遷移の中の二つの開始タイミングのいずれかに開始できるものと定義される。「同時開始」は、あるイベントが開始されたタイミングで次の行を開始する指定である。「実行内容実施後」は、あるイベントが指定された内容を実行した後に次の行を開始する指定である。「開始しない」は次の行があってもそれを開始しない指定であり、タイミングの選択ではない。   FIG. 14 is a diagram showing a definition of next row start timing information applied for each event. Except for special events, when an event is started, it prepares, waits, and proceeds with execution and state. Each event flow and state transition will be described later. The next line (next event) is defined as being able to start at one of the two start timings in the state transition. “Simultaneous start” is a designation to start the next line at the timing when a certain event is started. “After execution content has been executed” is a specification for starting the next line after executing the specified content for a certain event. “Do not start” specifies that even if there is a next line, it does not start, and is not a timing selection.

図15は、トリガの処理を示すフローチャートである。トリガは、指定されたきっかけの待ちを行い常に常駐する。トリガは、きっかけが発生する毎に通知をもらい、指定された実行条件が真であるか否かを判定し(S10)、真である場合には次イベントを開始(登録)し(S12)、偽である場合には処理を終了する。   FIG. 15 is a flowchart showing trigger processing. The trigger waits for the specified trigger and always stays resident. The trigger receives a notification every time a trigger occurs, determines whether or not the designated execution condition is true (S10), and if true, starts (registers) the next event (S12), If it is false, the process ends.

次イベントを開始(登録)とは、次の行のイベントを開始することである。登録により、ソフトウェア上「次イベントを開始(登録)」の処理を完全に終えてから登録したイベントを開始することができる。よって、ネストで開始される可能性がある次イベントの開始と終了の順番を期待通りに揃えることができる。   To start (register) the next event is to start the next line event. By registering, the registered event can be started after the process of “start next event (registration)” is completely completed. Therefore, the order of the start and end of the next event that can be started by nesting can be aligned as expected.

図16は、トリガの状態遷移を示す図である。トリガは常駐するため、準備状態(S20)から準備完了すると、実行待ち状態(S22)と実行中(S24)の間を行き来する。   FIG. 16 is a diagram illustrating trigger state transition. Since the trigger is resident, when the preparation is completed from the preparation state (S20), it goes back and forth between the execution waiting state (S22) and the execution (S24).

図17は、サブモジュールトリガの処理を示すフローチャートである。サブモジュールトリガは、常駐ではなく、サブモジュールイベントから呼び出された時に生成されて処理を行う。サブモジュールトリガは、その他はトリガと同様に、指定された実行条件が真であるか否かを判定し(S30)、真である場合には次イベントを開始(登録)し(S32)、偽である場合には処理を終了する。   FIG. 17 is a flowchart showing the sub-module trigger process. A submodule trigger is not resident, but is generated and processed when called from a submodule event. The sub module trigger determines whether or not the specified execution condition is true (S30), and otherwise starts (registers) the next event (S32) and false. If so, the process ends.

サブモジュールトリガは、復帰先と復帰先履歴(後述)を渡される。サブモモジュールトリガは、この復帰先履歴に復帰先を追加する。また、サブモモジュールトリガは、次の行のイベントを生成してこの復帰先履歴を通知し、次の行のイベントを開始する。   The submodule trigger is passed a return destination and a return destination history (described later). The submodule module trigger adds a return destination to the return destination history. The sub module trigger generates an event of the next line, notifies the return destination history, and starts an event of the next line.

図18は、サブモジュールトリガの状態遷移を示す図である。サブモジュールイベントから呼び出されて生成され開始指示を受けると、準備状態(S40)から実行中(S42)に遷移し、実行条件を判断して真であれば次の行のイベントを開始する。サブモジュールトリガは、常駐ではないので生成と消滅がある。   FIG. 18 is a diagram illustrating state transition of the submodule trigger. When it is called from a submodule event and is generated and receives a start instruction, it transitions from the ready state (S40) to being executed (S42). Since submodule triggers are not resident, they are created and destroyed.

図19は、通常のイベントの処理を示すフローチャートである。なお、通常のイベントとは、この実施例では「トリガ」、「サブモジュールトリガ」、「サブモジュールイベント」、「サブモジュール完了イベント」、「終端イベント」以外のイベントであり、図14に示した「次行開始タイミング」が選択可能にされている。   FIG. 19 is a flowchart showing normal event processing. In this embodiment, normal events are events other than “trigger”, “submodule trigger”, “submodule event”, “submodule completion event”, and “end event”, and are shown in FIG. “Next line start timing” is selectable.

シーケンス実行部304は、図19に示すように、通常のイベントに対して、同時に次イベント開始の設定があるか否かを判定する(S50)。シーケンス実行部304は、同時に次イベント開始の設定がある場合には、次イベントを開始(登録)し(S51)する。また、シーケンス実行部304は、同時に次イベント開始の設定がない場合には、指定された待ちが終了したか否かを判定する(S52)。   As shown in FIG. 19, the sequence execution unit 304 determines whether there is a setting for starting a next event at the same time for a normal event (S50). If there is a setting for starting the next event at the same time, the sequence execution unit 304 starts (registers) the next event (S51). If there is no setting for starting the next event at the same time, the sequence execution unit 304 determines whether the designated wait has ended (S52).

シーケンス実行部304は、指定された待ちが終了すると、指定された実行条件が真であるか否かを判定する(S53)。シーケンス実行部304は、指定された実行条件が真である場合には指定実行内容を実施し(S54)、偽である場合には処理を終了する。   When the designated waiting is completed, the sequence execution unit 304 determines whether or not the designated execution condition is true (S53). The sequence execution unit 304 executes the specified execution content when the specified execution condition is true (S54), and ends the process when it is false.

次に、シーケンス実行部304は、実行後に次イベント開始の設定があるか否かを判定する(S55)。シーケンス実行部304は、実行後に次イベント開始の設定がある場合には次イベントを開始(登録)し(S56)、実行後に次イベント開始の設定がない場合には処理を終了する。   Next, the sequence execution unit 304 determines whether there is a setting for starting the next event after execution (S55). The sequence execution unit 304 starts (registers) the next event if there is a setting for starting the next event after execution (S56), and ends the process if there is no setting for starting the next event after execution.

つまり、あるイベントが「同時開始」に設定されている場合、自身の開始と同時に無条件に次の行のイベントが開始される。あるイベントが「実行内容実施後」に設定されている場合、自身に指定された実行内容を実施した直後に次の行イベントが開始される。このイベントは、次の行の開始前に自身が持つ復帰先履歴を次ぎの行に通知する。   That is, when an event is set to “simultaneous start”, the event of the next line is unconditionally started simultaneously with the start of itself. When an event is set to “after execution content execution”, the next line event is started immediately after executing the execution content specified by itself. This event notifies the next line of the return destination history held by itself before the start of the next line.

図20は、通常のイベントの状態遷移を示す図である。通常のイベントは、準備状態(S60)から準備完了すると、実行待ち状態(S62)に遷移し、待ちが終了すると実行中(S64)に遷移する。通常のイベントは、常駐しないので、実行を終えたら終了する。また、通常のイベントは、実行条件が偽となった場合には、何も実行しない。また、通常のイベントは、実行条件が偽となった場合で「実行内容実施後」の設定の場合には、次の行も開始せずに終了して消滅する。   FIG. 20 is a diagram illustrating a state transition of a normal event. When the preparation is completed from the preparation state (S60), the normal event transitions to the execution waiting state (S62), and transitions to the execution (S64) when waiting is completed. Since normal events are not resident, they are terminated when execution is completed. Also, normal events are not executed when the execution condition becomes false. In addition, when the execution condition becomes false and the setting “after execution content” is set, the normal event ends and disappears without starting the next line.

図21は、サブモジュールイベントの処理を示すフローチャートである。シーケンス実行部304は、図21に示すように、サブモジュールイベントに対して、同時に次イベント開始の設定があるか否かを判定する(S70)。シーケンス実行部304は、同時に次イベント開始の設定がある場合には、次イベントを開始(登録)し(S71)する。また、シーケンス実行部304は、同時に次イベント開始の設定がない場合には、指定された待ちが終了したか否かを判定する(S72)。   FIG. 21 is a flowchart showing the processing of the submodule event. As shown in FIG. 21, the sequence execution unit 304 determines whether there is a setting for starting the next event at the same time for the submodule event (S70). If there is a setting for starting the next event at the same time, the sequence execution unit 304 starts (registers) the next event (S71). If there is no setting for starting the next event at the same time, the sequence execution unit 304 determines whether the designated wait has ended (S72).

シーケンス実行部304は、指定された待ちが終了すると、指定された実行条件が真であるか否かを判定する(S73)。シーケンス実行部304は、指定された実行条件が真である場合には指定実行内容を実施し(S74)、偽である場合には処理を終了する。   When the designated waiting is completed, the sequence execution unit 304 determines whether or not the designated execution condition is true (S73). The sequence execution unit 304 executes the specified execution content when the specified execution condition is true (S74), and ends the process when it is false.

次に、シーケンス実行部304は、実行後に次イベント開始の設定があるか否かを判定する(S75)。シーケンス実行部304は、実行後に次イベント開始の設定がある場合には次イベントを開始(登録)し(S76)、実行後に次イベント開始の設定がない場合には処理を終了する。   Next, the sequence execution unit 304 determines whether there is a setting for starting the next event after execution (S75). The sequence execution unit 304 starts (registers) the next event if there is a setting for starting the next event after execution (S76), and ends the process if there is no setting for starting the next event after execution.

図22は、サブモジュールイベントの状態遷移を示す図である。サブモジュールイベントは、準備状態(S80)から準備完了すると、実行待ち状態(S82)に遷移し、待ちが終了すると実行中(S84)に遷移する。   FIG. 22 is a diagram illustrating state transition of a submodule event. When the preparation is completed from the preparation state (S80), the submodule event transitions to the execution waiting state (S82), and when the waiting is completed, the submodule event transitions to being executed (S84).

サブモジュールイベントは、通常のイベントと処理は同じであるが、指定されている実行内容が、指定されたサブモジュールへの分岐である。サブモジュールを呼び出すときに、該当するサブモジュールトリガを生成するが、その時にそのサブモジュールがサブモジュール完了イベントで復帰するイベントを通知してからサブモジュールトリガを開始する。サブモジュールイベントは、復帰先を通知するのと同時に、自身が持つ復帰先履歴の列もサブモジュールトリガに渡す。復帰先履歴については後述する。   A submodule event has the same processing as a normal event, but the designated execution content is a branch to the designated submodule. When a submodule is called, the corresponding submodule trigger is generated. At that time, the submodule trigger is started after notifying an event that the submodule returns with a submodule completion event. The submodule event notifies the return destination, and also passes the return destination history column of the submodule event to the submodule trigger. The return destination history will be described later.

図23は、サブモジュール完了イベントの処理を示すフローチャートである。サブモジュール完了イベントは、指定された実行条件が真であるか否かを判定し(S90)、真である場合には指定実行内容を実施し(S92)、偽である場合には処理を終了する。サブモジュール完了の実行内容は、通知されている復帰先のイベントを生成して開始することである。同時に、サブモジュール完了イベントは、持っている復帰先履歴から、復帰を行う復帰先の情報を削除して、復帰先イベントに復帰先履歴を渡す。   FIG. 23 is a flowchart showing processing of a submodule completion event. The submodule completion event determines whether or not the specified execution condition is true (S90). If it is true, the designated execution content is executed (S92), and if it is false, the process is terminated. To do. The execution content of the completion of the submodule is to generate and start a notified return destination event. At the same time, the submodule completion event deletes the information of the return destination to be returned from the return destination history that it has, and passes the return destination history to the return destination event.

図24は、サブモジュール完了イベントの状態遷移を示す図である。サブモジュール完了イベントは、待ちを行わずに準備完了となって準備状態(S100)から実行中(S102)に遷移し、実行条件判断を行って、真ならば復帰を行ってから終了消滅し、偽ならば何もしないで終了消滅する。   FIG. 24 is a diagram showing the state transition of the submodule completion event. The sub-module completion event becomes preparation completion without waiting, transitions from the preparation state (S100) to execution (S102), performs execution condition determination, and if true, returns and then ends and disappears. If false, do nothing and quit.

図25は、終端イベントの処理を示す図である。図25に示すように、終端イベントは何もしない。次の行の開始もしないので、ここに辿りついたシーケンスはこの経路の処理は終了となる。終端イベントも復帰先履歴は渡されるが、不要な情報なので扱わない。   FIG. 25 is a diagram illustrating processing of a termination event. As shown in FIG. 25, the end event does nothing. Since the next line is not started, the processing of this path is completed for the sequence that reaches here. The return event is also passed to the end event, but it is not handled because it is unnecessary information.

図26は、終端イベントの状態遷移を示す図である。終端イベントは、開始直後に終了して消滅する。   FIG. 26 is a diagram illustrating state transition of a termination event. The end event ends immediately and disappears.

次に、シーケンス制御装置10におけるサブモジュールを利用したシーケンスの並行動作について説明する。図27は、シーケンス入力部202における入力の第2例を示す図である。シーケンス入力部202は、イベントごとに次のイベントの開始タイミングが当該イベントと同時であるか、当該イベントの実行後であるか、又は次のイベントを開始しないかを示す情報を設定可能にされた形式のデータの入力を受入れる。また、シーケンス入力部202は、呼び出されることによって複数のイベントをシーケンス実行部304に実行させるサブルーチンを示す情報、及びサブルーチンからの復帰先を示す情報を設定可能にされた形式のデータの入力を受入れる。   Next, the parallel operation of the sequence using the submodule in the sequence control apparatus 10 will be described. FIG. 27 is a diagram illustrating a second example of input in the sequence input unit 202. The sequence input unit 202 can set information indicating whether the start timing of the next event is the same as that of the event, after the execution of the event, or not to start the next event for each event. Accept input of format data. In addition, the sequence input unit 202 accepts input of data in a format in which information indicating a subroutine causing the sequence execution unit 304 to execute a plurality of events when called and information indicating a return destination from the subroutine can be set. .

シーケンス実行部304は、シーケンス入力部202が受入れたデータが示す開始タイミングに応じて、次のイベントが示す制御対象に対する処理の実行を開始する。また、シーケンス実行部304は、サブルーチンをイベントとして実行する。   The sequence execution unit 304 starts executing the process for the control target indicated by the next event in accordance with the start timing indicated by the data received by the sequence input unit 202. The sequence execution unit 304 executes a subroutine as an event.

具体的には、シーケンス実行部304は、図27に示したシーケンス入力部202における入力の第2例に基づいて、「サブモジュールイベント0−7」を「同時開始」することにより、「サブモジュールトリガ1」を開始するのと同時に、「サブモジュールイベント0−8」を開始する(A)。   Specifically, the sequence execution unit 304 “sub-module event 0-7” “simultaneously starts” based on the second example of the input in the sequence input unit 202 shown in FIG. At the same time as trigger 1 "is started," submodule event 0-8 "is started (A).

同時に開始された「サブモジュールイベント0−8」は、「サブモジュールトリガ2」を開始する。この時、「サブモジュールトリガ1」を先頭に持つサブモジュールと、「サブモジュールトリガ2」を先頭に持つサブモジュールは、並行して実行されていることになる(A)。「サブモジュールイベント0−8」は、更に「同時開始」指定であるため、これらの並行処理に加えて、更に「イベント0−9」の処理も開始されて並行動作が行われる。   The “submodule event 0-8” started at the same time starts “submodule trigger 2”. At this time, the submodule having “submodule trigger 1” at the head and the submodule having “submodule trigger 2” at the head are executed in parallel (A). Since “submodule event 0-8” is further designated as “simultaneous start”, in addition to these parallel processes, the process of “event 0-9” is also started and a parallel operation is performed.

「サブモジュールイベント0−7」が「サブモジュールトリガ1」を開始すると、「サブモジュールイベント1−6」が実行されたときに(B)、「サブモジュールトリガ3」が実行されて完了後に復帰する(C)。「サブモジュールイベント0−7」が完了すると、指定された復帰先に復帰する(D)。   When “submodule event 0-7” starts “submodule trigger 1”, when “submodule event 1-6” is executed (B), “submodule trigger 3” is executed and returns after completion. (C). When “submodule event 0-7” is completed, the process returns to the designated return destination (D).

次に、シーケンス制御装置10におけるサブモジュールを利用したシーケンスの逐次動作について説明する。図28は、シーケンス入力部202における入力の第3例を示す図である。シーケンス入力部202における入力の第3例では、「サブモジュールイベント0−7」が同時開始しない設定にされており、更に次の行のイベントを実行しない設定であると同時に、復帰先イベントに「サブモジュールイベント0−8」が指定されている。これにより、「サブモジュールトリガ1」が開始された時には、まだ「サブモジュールイベント0−8」は開始されていない。「サブモジュールトリガ1」を先頭に持つサブモジュールが「サブモジュール完了イベント1−h」で復帰するとき(D)に、指定されていた「サブモジュールイベント0−8」が呼び出されることにより、「サブモジュールトリガ1」を先頭にもつサブモジュールと、「サブモジュールイベント0−8」から呼び出される「サブモジュールトリガ2」を先頭に持つサブモジュールが逐次的に処理される。   Next, the sequential operation of the sequence using the submodule in the sequence control apparatus 10 will be described. FIG. 28 is a diagram illustrating a third example of input in the sequence input unit 202. In the third example of input in the sequence input unit 202, “submodule event 0-7” is set not to start simultaneously, and the event of the next line is set not to be executed. "Submodule event 0-8" is designated. Thus, when “submodule trigger 1” is started, “submodule event 0-8” is not yet started. When the submodule having “submodule trigger 1” at the head returns with “submodule completion event 1-h” (D), the designated “submodule event 0-8” is called, A submodule having “submodule trigger 1” at the head and a submodule having “submodule trigger 2” called from “submodule event 0-8” at the head are sequentially processed.

図29は、重ねた分岐から元の復帰先に戻る過程を示す図である。Bで始まる位置は、「サブモジュールイベント」がある箇所である。Sで始まる位置は、「トリガ」又は「サブモジュールトリガ」の位置である。Eで始まる位置は、「サブモジュール完了イベント」の位置である。Rで始まる位置は、復帰先に指定されたイベントの位置である。Tで始まる位置は、「終端イベント」の位置である。   FIG. 29 is a diagram illustrating a process of returning from the overlapped branch to the original return destination. The position starting with B is where there is a “submodule event”. The position starting with S is the position of “trigger” or “submodule trigger”. The position starting with E is the position of the “submodule completion event”. The position starting with R is the position of the event specified as the return destination. The position starting with T is the position of the “end event”.

B1−1で分岐先S2、復帰先R1−1を指定されたシーケンスは、B2−1−1で更にS3に分岐するが、T3でこの経路のシーケンスは終了する。B2−1−1で並行に開始された経路は、B2−1−2で更に分岐先S4、復帰先R2−2を指定され、S4からE4を経て復帰先R2−2に戻るが、更にE2−2で、一番初めのB1−1で指定された復帰先のR1−1に戻る。この様に、復帰先は、復帰する都度更に前の復帰先を知ることができる様になっている必要がある。シーケンス実行部304は、サブモジュール(サブルーチン)から他のサブモジュールを呼び出す場合、他のサブモジュールに対して自身のサブモジュールへの復帰先を通知する。   The sequence in which the branch destination S2 and the return destination R1-1 are designated in B1-1 further branches to S3 in B2-1-1, but the sequence of this route is completed in T3. The route started in parallel with B2-1-1 is further designated with branch destination S4 and return destination R2-2 in B2-1-2, returns to return destination R2-2 from S4 through E4, but further E2 -2 returns to the return destination R1-1 designated by the first B1-1. In this way, the return destination needs to be able to know the previous return destination each time it returns. When the sequence execution unit 304 calls another submodule from the submodule (subroutine), the sequence execution unit 304 notifies the other submodule of the return destination to its own submodule.

図30は、図29に示した分岐の処理においてシーケンス実行部304が保持すべき復帰先(復帰先履歴)の第1例を示す図である。図30においては、図29に示したB1−1からS2に分岐し、B2−1−2でS4に分岐し、E4でR2−2に復帰し、E2−2でR1−1に復帰する経路の各位置で保持しておくべき復帰先の情報を示している。   FIG. 30 is a diagram showing a first example of a return destination (return destination history) that should be held by the sequence execution unit 304 in the branching process shown in FIG. In FIG. 30, the route branches from B1-1 to S2 shown in FIG. 29, branches to S4 at B2-1-2, returns to R2-2 at E4, and returns to R1-1 at E2-2. The information of the return destination that should be held at each position is shown.

復帰先は、スタック(LIFO)の列に格納されて管理される。シーケンス実行部304は、分岐が発生する都度新しい復帰先をスタック領域に積み、復帰が起こる都度スタックから復帰先を取り出して、取り出した先の復帰先に復帰する処理を実行する。スタックは、取り出しが起こると、最も新しく格納された情報を破棄する。イベントは、各行単位で次の行を開始することによりシーケンスが継続するが、復帰先のスタックはシーケンスが進んでも継続して保持されねばならない。このため、次の行を開始するイベントは次の行に、自身が持つ復帰先履歴を通知し、次の行は通知された復帰先履歴を自身が消滅するまで保持する必要がある。   The return destination is stored and managed in a stack (LIFO) column. The sequence execution unit 304 executes a process of loading a new return destination in the stack area every time a branch occurs, taking out the return destination from the stack every time a return occurs, and returning to the return destination. The stack discards the most recently stored information when retrieval occurs. The sequence of events continues by starting the next row in units of each row, but the return destination stack must continue even if the sequence advances. For this reason, the event that starts the next line notifies the next line of the return destination history that it has, and the next line needs to hold the notified return destination history until it disappears.

また、「サブモジュールトリガ」イベントを開始する場合には、これを開始する「サブモジュールイベント」が自身のもつ復帰先履歴を「サブモジュールトリガ」に通知する他に、「サブモジュール」が復帰する先も通知する。「サブモジュールトリガ」は、この復帰先履歴を自身で保持した上で、更に通知されサブモジュールの復帰先をこの復帰先履歴のスタックの最新情報として格納する。逆に「サブモジュール完了イベント」は、自身が開始時に通知されて保持している復帰先履歴から最新の復帰先を一つ取り出して、その復帰先に復帰すると共に、この一つ復帰先を取り出した後の復帰先履歴を、復帰先のイベントに通知する。   In addition, when a “submodule trigger” event is started, in addition to notifying the “submodule trigger” of the return destination history of the “submodule event” that starts the “submodule trigger”, the “submodule” is restored. Also notify the destination. The “sub-module trigger” holds the return destination history by itself, and is further notified to store the return destination of the sub module as the latest information of the stack of the return destination history. On the other hand, the “submodule completion event” takes out the latest return destination from the return destination history that is notified and held by itself, returns to that return destination, and takes out this one return destination. The return destination history is notified to the return destination event.

図31は、図29に示した分岐の処理においてシーケンス実行部304が保持すべき復帰先(復帰先履歴)の第2例を示す図である。図30においては、図29に示したB1−1からS2に分岐して、B2−1−3からS5に分岐して、B5からS8に分岐して、E8からR5に復帰して、E5からR2−3に復帰して、B2−3からS6に分岐して、E6からR2−4に復帰して、E2−4からB1−1に復帰する経路の復帰先履歴が示されている。   FIG. 31 is a diagram illustrating a second example of the return destination (return destination history) that should be held by the sequence execution unit 304 in the branch processing shown in FIG. In FIG. 30, branch from B1-1 to S2 shown in FIG. 29, branch from B2-1-3 to S5, branch from B5 to S8, return from E8 to R5, and return from E5. The return destination history of the route returning from R2-3, branching from B2-3 to S6, returning from E6 to R2-4, and returning from E2-4 to B1-1 is shown.

次に、シーケンス実行部304が復帰先履歴を保持するために確保する記憶領域について説明する。図32には、シーケンス実行部304が保持すべき復帰先(復帰先履歴)の上述した第2例における動作例示範囲が枠で囲まれて示されている。図33は、図32に示した動作例示範囲に対してシーケンス実行部304が行う記憶領域の制御を模式的に示す図である。   Next, a storage area reserved for the sequence execution unit 304 to hold a return destination history will be described. In FIG. 32, the exemplary operation range in the above-described second example of the return destination (return destination history) to be held by the sequence execution unit 304 is surrounded by a frame. FIG. 33 is a diagram schematically showing storage area control performed by the sequence execution unit 304 for the operation example range shown in FIG. 32.

通常のソフトウェアのように、固定サイズのスタックをコンテキストごとに割当てると、任意の数のイベントが並列動作となる場合に、並列動作それぞれの復帰先を保持するために十分な領域をそれぞれ確保しておく必要があり、メモリ効率が悪くなってしまう。   When a fixed-size stack is assigned to each context, as in normal software, when an arbitrary number of events become parallel operations, a sufficient area is allocated to hold the return destination for each parallel operation. It is necessary to keep the memory efficiency low.

シーケンス実行部304は、保持すべき復帰先が発生するたびに、新しく保持する復帰先の分の記憶領域をヒープ領域から確保し、それをスタック情報(スタック領域)の最後の要素としてリストに加える。要素は、リスト化できるように最後から最初に向かって要素同士が序列情報を持つ。1つのスタックを所有する情報は、リストが空か、リストの最後の要素を記憶する。   Each time a return destination to be held occurs, the sequence execution unit 304 secures a storage area for the newly held return destination from the heap area, and adds it to the list as the last element of the stack information (stack area) . Elements have order information from the end to the beginning so that they can be listed. Information that owns one stack stores the last element of the list, whether the list is empty.

具体的には、シーケンス実行部304は、S1において復帰先の要素なしであった状態から、戻り先(R1−1)をヒープ領域から確保したスタック領域(スタック用メモリ)に書き込み、リストの最初の要素に繋ぐ(S2)。   Specifically, the sequence execution unit 304 writes the return destination (R1-1) to the stack area (stack memory) secured from the heap area from the state where there is no return destination element in S1, and starts the list. (S2).

S5では、シーケンス実行部304は、戻り先(R2−3)をヒープ領域から確保したスタック領域に書き込み、リストの2番目の要素に繋ぐ。   In S5, the sequence execution unit 304 writes the return destination (R2-3) from the heap area to the stack area and connects it to the second element in the list.

S8では、シーケンス実行部304は、戻り先(R5)をヒープ領域から確保したスタック領域に書き込み、リストの3番目の要素に繋ぐ。   In S8, the sequence execution unit 304 writes the return destination (R5) to the stack area secured from the heap area and connects it to the third element in the list.

R5では、シーケンス実行部304は、最後(3番目)の前(2番目)の要素をスタック最後の要素として憶え直し、元の最後(3番目)の要素を外してヒープ領域に記憶領域を返却する。   In R5, the sequence execution unit 304 remembers the last (third) previous (second) element as the last element in the stack, removes the original last (third) element, and returns the storage area to the heap area. To do.

このように、シーケンス実行部304は、一度復帰が発生すると、リストから最後の要素を取り外し、最後の前にあった要素を最後の要素に記憶し直して、元の最後の要素を記憶していた記憶領域をヒープ領域に返却(解放)する。また、シーケンス実行部304は、外した要素でスタックが空になる場合には、スタックを所有する情報として要素なしを保持する。よって、シーケンス実行部304は、復帰先履歴を保持する記憶領域を必要な分のみとすることができ、効率化できる。   In this manner, once the return has occurred, the sequence execution unit 304 removes the last element from the list, stores the element that was before the last in the last element, and stores the original last element. Return (release) the stored storage area to the heap area. In addition, when the stack becomes empty due to the removed element, the sequence execution unit 304 holds “no element” as information to own the stack. Therefore, the sequence execution unit 304 can make only a necessary storage area for storing the return destination history, and can improve efficiency.

図34は、シーケンス制御装置10の適用例を示す図である。機構部50は、例えば少なくとも3軸の回転とアームの開閉を可能にされたロボットアームである。シーケンス制御装置10は、PC20において生成されて変換されたデータがケーブル40を介して制御装置30へ送信され、機構部50が備える制御対象を制御装置30がシーケンス動作させている。   FIG. 34 is a diagram illustrating an application example of the sequence control device 10. The mechanism unit 50 is, for example, a robot arm capable of rotating at least three axes and opening and closing the arm. In the sequence control device 10, data generated and converted in the PC 20 is transmitted to the control device 30 via the cable 40, and the control device 30 causes the control target included in the mechanism unit 50 to perform a sequence operation.

10 シーケンス制御装置
20 PC
30 制御装置
50 機構部
60 スプレッドシート
70 アプリケーション
200 設定入力部
202 シーケンス入力部
204 変換部
206 通信部
300 通信部
302 記憶部
304 シーケンス実行部
306 駆動部
500 ステッピングモータ
502 DCサーボモータ
504 センサ
506 入出力ポート
508 タイマ
10 Sequence control device 20 PC
30 control device 50 mechanism unit 60 spreadsheet 70 application 200 setting input unit 202 sequence input unit 204 conversion unit 206 communication unit 300 communication unit 302 storage unit 304 sequence execution unit 306 drive unit 500 stepping motor 502 DC servo motor 504 sensor 506 input / output Port 508 timer

特開2002−323912号公報JP 2002-323912 A

Claims (16)

複数の制御対象それぞれの動作の開始又は停止のタイミングを示す順序論理を特定する予め定められた形式のデータの入力を受入れるシーケンス入力部と、
前記複数の制御対象それぞれの少なくとも動作に対する設定入力を受入れる設定入力部と、
前記シーケンス入力部が受入れた前記データに基づいて前記順序論理を解釈し、前記順序論理に応じたタイミングで前記複数の制御対象それぞれの動作を開始又は停止させる処理をそれぞれイベントとして実行するシーケンス実行部と、
前記シーケンス実行部が動作を開始させたタイミングで、前記設定入力部が受入れた前記設定入力に応じて、前記複数の制御対象をそれぞれ駆動する駆動部と、
を有することを特徴とするシーケンス制御装置。
A sequence input unit that accepts input of data in a predetermined format that specifies the order logic indicating the start or stop timing of the operation of each of the plurality of control objects;
A setting input unit that accepts a setting input for at least the operation of each of the plurality of control objects;
A sequence execution unit that interprets the sequential logic based on the data received by the sequence input unit, and executes, as an event, a process for starting or stopping the operations of the plurality of control objects at a timing according to the sequential logic. When,
A driving unit that drives each of the plurality of control objects according to the setting input received by the setting input unit at a timing when the sequence execution unit starts an operation;
A sequence control device comprising:
前記シーケンス実行部は、
前記順序論理に応じたタイミングで実行条件を判断し、実行可能であれば前記複数の制御対象それぞれの動作を開始又は停止させる処理を実行すること
を特徴とする請求項1に記載のシーケンス制御装置。
The sequence execution unit
2. The sequence control device according to claim 1, wherein an execution condition is determined at a timing according to the order logic, and if it can be executed, a process of starting or stopping the operation of each of the plurality of control objects is executed. .
前記シーケンス入力部は、
イベントごとに任意の順序で配列された形式の前記データの入力を受入れること
を特徴とする請求項1又は2に記載のシーケンス制御装置。
The sequence input unit includes:
The sequence control device according to claim 1 or 2, wherein input of the data in a format arranged in an arbitrary order for each event is accepted.
前記シーケンス入力部は、
イベントごとに少なくとも前記制御対象のいずれかを特定する情報、特定された前記制御対象の具体的動作を示す情報、前記具体的動作に対する時限制御及び条件制御の条件を示す情報を設定可能にされた形式の前記データの入力を受入れること
を特徴とする請求項3に記載のシーケンス制御装置。
The sequence input unit includes:
Information for specifying at least one of the controlled objects for each event, information indicating a specific operation of the specified controlled object, information indicating conditions of timed control and condition control for the specific operation can be set The sequence control device according to claim 3, wherein an input of the data in a format is accepted.
前記シーケンス入力部は、
イベントごとに設定可能な項目をリストにして表示し、ユーザに項目の選択を促して前記データの入力を受入れること
を特徴とする請求項3又は4に記載のシーケンス制御装置。
The sequence input unit includes:
The sequence control device according to claim 3 or 4, wherein items that can be set for each event are displayed as a list, and the user is prompted to select an item and the input of the data is accepted.
前記シーケンス入力部は、
イベントごとに次のイベントの開始タイミングが当該イベントと同時であるか、当該イベントの実行後であるか、又は次のイベントを開始しないかを示す情報を設定可能にされた形式の前記データの入力を受入れ、
前記シーケンス実行部は、
前記シーケンス入力部が受入れた前記データが示す開始タイミングに応じて、次のイベントを開始すること
を特徴とする請求項5に記載のシーケンス制御装置。
The sequence input unit includes:
Input of the data in a format in which information indicating whether the start timing of the next event is the same as that of the event, after the execution of the event, or not to start the next event can be set for each event Accept,
The sequence execution unit
The sequence control device according to claim 5, wherein the next event is started in accordance with a start timing indicated by the data received by the sequence input unit.
前記シーケンス入力部は、
呼び出されることによって複数のイベントを前記シーケンス実行部に実行させるサブルーチンを示す情報、及び前記サブルーチンからの復帰先を示す情報を設定可能にされた形式の前記データの入力を受入れ、
前記シーケンス実行部は、
前記サブルーチンをイベントとして実行すること
を特徴とする請求項6に記載のシーケンス制御装置。
The sequence input unit includes:
Information indicating a subroutine that causes the sequence execution unit to execute a plurality of events by being called, and accepting input of the data in a format that can set information indicating a return destination from the subroutine,
The sequence execution unit
The sequence control apparatus according to claim 6, wherein the subroutine is executed as an event.
前記シーケンス実行部は、
前記サブルーチンから他のサブルーチンを呼び出す場合、前記他のサブルーチンに対して前記サブルーチンの復帰先を通知すること
を特徴とする請求項7に記載のシーケンス制御装置。
The sequence execution unit
The sequence control device according to claim 7, wherein, when another subroutine is called from the subroutine, the return destination of the subroutine is notified to the other subroutine.
前記シーケンス実行部は、
前記サブルーチンの復帰先をスタック構造の復帰先履歴として、そのサブルーチンを構成する個々の前記イベントが保持し、個々のイベントが保持する復帰先履歴は、あるイベントが次のイベントの開始に先立ち、次のイベントに自身の復帰先履歴を示し、次のイベントがこの復帰先履歴を複製して引き継がれること
を特徴とする請求項7又は8に記載のシーケンス制御装置。
The sequence execution unit
The return destination of the subroutine is set as the return destination history of the stack structure, and each of the events constituting the subroutine is held. The return destination history held by each event is that the next event is preceded by the start of the next event. The sequence control device according to claim 7 or 8, wherein the return event is indicated in the event, and the next event is duplicated and taken over by the next event.
前記シーケンス実行部は、
スタック構造の前記復帰先履歴を保持する領域を、前記サブルーチンからの復帰が実行された場合に解放されるヒープ領域から確保すること
を特徴とする請求項9に記載のシーケンス制御装置。
The sequence execution unit
The sequence control device according to claim 9, wherein an area for holding the return destination history of the stack structure is secured from a heap area that is released when the return from the subroutine is executed.
前記シーケンス入力部は、
前記サブルーチンからの復帰先をなしとする情報を設定可能にされており、復帰先なしの設定場合、サブルーチンとして呼ばれたイベントは、呼び出し元の復帰先履歴を引き継がないこと
を特徴とする請求項7乃至10のいずれか1項に記載のシーケンス制御装置。
The sequence input unit includes:
The information indicating that there is no return destination from the subroutine can be set, and when no return destination is set, an event called as a subroutine does not inherit the return destination history of the caller. The sequence control device according to any one of 7 to 10.
前記設定入力部は、
前記複数の制御対象それぞれに名称を付与する設定入力をさらに受入れ、
前記シーケンス入力部は、
前記設定入力部が受入れた設定入力により付与される名称を用いて、設定可能な項目を前記リストにして表示すること
を特徴とする請求項5乃至11のいずれか1項に記載のシーケンス制御装置。
The setting input unit
Further accepting a setting input for assigning a name to each of the plurality of control objects,
The sequence input unit includes:
The sequence control device according to any one of claims 5 to 11, wherein a settable item is displayed as the list by using a name given by a setting input accepted by the setting input unit. .
前記設定入力部は、
前記制御対象の種類に応じて、設定可能なパラメータが定義されていること
を特徴とする請求項1乃至12のいずれか1項に記載のシーケンス制御装置。
The setting input unit
The sequence control device according to any one of claims 1 to 12, wherein a settable parameter is defined in accordance with a type of the control target.
前記複数の制御対象は、
ステッピングモータ、DCサーボモータ、センサ、出力ポート及びタイマの少なくともいずれかを含むこと
を特徴とする請求項1乃至13のいずれか1項に記載のシーケンス制御装置。
The plurality of control objects are:
The sequence control device according to claim 1, comprising at least one of a stepping motor, a DC servo motor, a sensor, an output port, and a timer.
前記設定入力部は、
前記複数の制御対象それぞれに対し、前記シーケンス実行部が動作を開始させる対象であるか否かを示す設定入力を受入れ、
前記シーケンス実行部は、
動作を開始させる対象でないことを示す設定入力がなされた前記制御対象を前記リストに表示しないこと
を特徴とする請求項5乃至12のいずれか1項に記載のシーケンス制御装置。
The setting input unit
For each of the plurality of control objects, accepts a setting input indicating whether or not the sequence execution unit is an object for starting an operation,
The sequence execution unit
The sequence control device according to any one of claims 5 to 12, wherein the control target to which a setting input indicating that the operation is not started is not displayed in the list.
前記設定入力部が受入れた設定入力、及び前記シーケンス入力部が受入れた前記データを、前記シーケンス実行部又は前記駆動部が使用できる形式のデータに変換する変換部をさらに有すること
を特徴とする請求項1乃至15のいずれか1項に記載のシーケンス制御装置。
The system further comprises a conversion unit that converts the setting input received by the setting input unit and the data received by the sequence input unit into data in a format that can be used by the sequence execution unit or the driving unit. Item 16. The sequence control device according to any one of Items 1 to 15.
JP2016054501A 2015-10-27 2016-03-17 Sequence control device Pending JP2017084321A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015210972 2015-10-27
JP2015210972 2015-10-27

Publications (1)

Publication Number Publication Date
JP2017084321A true JP2017084321A (en) 2017-05-18

Family

ID=58711984

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016054501A Pending JP2017084321A (en) 2015-10-27 2016-03-17 Sequence control device

Country Status (1)

Country Link
JP (1) JP2017084321A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112017002507T5 (en) 2016-07-05 2019-03-07 Semiconductor Energy Laboratory Co., Ltd. Positive electrode active material, method for producing the positive electrode active material and secondary battery

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04262402A (en) * 1991-02-15 1992-09-17 Mitsubishi Electric Corp Programmable controller
JP2002323912A (en) * 2001-04-26 2002-11-08 Fuji Electric Co Ltd Device and method for generating program specification and sequence control system
JP2004199524A (en) * 2002-12-19 2004-07-15 Omron Corp Apparatus and method for control program generation, and program product
JP2006099622A (en) * 2004-09-30 2006-04-13 Dkk Toa Corp Method and system for creating sequence program, and sequence control system
JP2006309387A (en) * 2005-04-27 2006-11-09 Matsushita Electric Ind Co Ltd Method for supporting program compilation of programmable logic controller
WO2014136228A1 (en) * 2013-03-06 2014-09-12 三菱電機株式会社 Programmable controller, programmable controller system, and execute error information creation method
JP5755389B1 (en) * 2014-06-12 2015-07-29 三菱電機株式会社 Drawing software

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04262402A (en) * 1991-02-15 1992-09-17 Mitsubishi Electric Corp Programmable controller
JP2002323912A (en) * 2001-04-26 2002-11-08 Fuji Electric Co Ltd Device and method for generating program specification and sequence control system
JP2004199524A (en) * 2002-12-19 2004-07-15 Omron Corp Apparatus and method for control program generation, and program product
JP2006099622A (en) * 2004-09-30 2006-04-13 Dkk Toa Corp Method and system for creating sequence program, and sequence control system
JP2006309387A (en) * 2005-04-27 2006-11-09 Matsushita Electric Ind Co Ltd Method for supporting program compilation of programmable logic controller
WO2014136228A1 (en) * 2013-03-06 2014-09-12 三菱電機株式会社 Programmable controller, programmable controller system, and execute error information creation method
JP5755389B1 (en) * 2014-06-12 2015-07-29 三菱電機株式会社 Drawing software

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112017002507T5 (en) 2016-07-05 2019-03-07 Semiconductor Energy Laboratory Co., Ltd. Positive electrode active material, method for producing the positive electrode active material and secondary battery
DE202017007585U1 (en) 2016-07-05 2023-07-13 Semiconductor Energy Laboratory Co., Ltd. Positive electrode active material and secondary battery
DE202017007594U1 (en) 2016-07-05 2023-09-11 Semiconductor Energy Laboratory Co., Ltd. Positive electrode active material and secondary battery
DE202017007629U1 (en) 2016-07-05 2023-09-29 Semiconductor Energy Laboratory Co., Ltd. Positive electrode active material and secondary battery
DE202017007624U1 (en) 2016-07-05 2023-10-04 Semiconductor Energy Laboratory Co., Ltd. Positive electrode active material and secondary battery
DE202017007669U1 (en) 2016-07-05 2024-02-08 Semiconductor Energy Laboratory Co., Ltd. Positive electrode active material and secondary battery

Similar Documents

Publication Publication Date Title
JP4388427B2 (en) Numerical control device that can call programs written in script language
US20060095855A1 (en) HMI reconfiguration method and system
US10324438B2 (en) Sequence-control programming apparatus, sequence-control programming method, and operating system
US10384349B2 (en) Processing robot system in which processing device is connected to robot to perform processing
CN104219553A (en) Method and device for remote control of intelligent set top box
JP2007213341A (en) Programmable logic controller, information processing apparatus, control program, and table preparation program
JP5295061B2 (en) Programmable controller
EP3118991B1 (en) Motor control device, motor control system, motor control method, and motor control program
JP2017084321A (en) Sequence control device
US20200218220A1 (en) Method and data processing device for the computer-supported providing of information, available in the form of computer code, for a process module, and computer program product for carrying out the method
US20140309751A1 (en) Controller, device control system, computer program, computer readable storage medium
JP5996150B2 (en) Programmable display and drawing software
JP2982187B2 (en) Programmable controller
JP2012159868A (en) Programming device of programmable logic controller
JP4556787B2 (en) Programmable controller editing device
CN106155519B (en) Screen information generating device
JP6939662B2 (en) Programming support device, programming support method and program
JP6191625B2 (en) Inverter control device and its peripheral devices
CN115362416A (en) System for processing input data from a food processing line to determine trigger data for sampling and method thereof
CN108762197B (en) Motion control method and motion controller based on PLC
EP3582113A1 (en) Graphical representation of an industrial system for efficiently searching, displaying and managing devices of the industrial system
CN111258895A (en) Execution instruction processing method, device and storage medium
JP5027820B2 (en) Method for controlling a modular production machine composed of apparatus and components
US20180307201A1 (en) System and method for creating a human-machine interface
US20190134816A1 (en) Control of a robot system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190122

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200107

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200306

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20200507