JP2014146070A - Control device, control method, and program - Google Patents

Control device, control method, and program Download PDF

Info

Publication number
JP2014146070A
JP2014146070A JP2013012581A JP2013012581A JP2014146070A JP 2014146070 A JP2014146070 A JP 2014146070A JP 2013012581 A JP2013012581 A JP 2013012581A JP 2013012581 A JP2013012581 A JP 2013012581A JP 2014146070 A JP2014146070 A JP 2014146070A
Authority
JP
Japan
Prior art keywords
program
slave
state
plc
slave device
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.)
Granted
Application number
JP2013012581A
Other languages
Japanese (ja)
Other versions
JP6299064B2 (en
Inventor
Shinya Higashikura
晋也 東倉
Shigenori Sawada
成憲 澤田
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2013012581A priority Critical patent/JP6299064B2/en
Publication of JP2014146070A publication Critical patent/JP2014146070A/en
Application granted granted Critical
Publication of JP6299064B2 publication Critical patent/JP6299064B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a PLC capable of switching the state of active slave devices between a valid state and an invalid state.SOLUTION: A PLC 1 communicates with each of a plurality of slave devices through a field network. The PLC 1 stores a user program 236 and a library 280 to be used by the user program 236. The PLC executes the user program 236. One of programs of the library 280 achieves a function for changing a slave device from an invalid state to a valid state and a function for changing the slave device from the valid state to the invalid state. The user program 236 includes a description for instructing execution of the program with the state of a slave device designated among the plurality of slave devices as a change object in the case of receiving a predetermined input.

Description

本発明は、機械や設備などの動作を制御するための用いられる制御装置、制御方法、およびプログラムに関する。   The present invention relates to a control device, a control method, and a program used for controlling operations of machines, facilities, and the like.

従来、工作機械の分野では数値制御が用いられている。特許文献1には、数値制御を用いたシステムとして、マスタ局と複数のスレーブ局とから構成される制御システムが開示されている。当該マスタ局は、以下の処理を行なう。マスタ局は、制御プログラムの実行に当たり、システムパラメータファイルおよび環境設定情報に相当するデータを読み出す。マスタ局は、当該読み出したデータに基づき、各スレーブ局が有効な状態か否かを判断する。マスタ局は、制御プログラムにおける命令がスレーブ局に対する命令である場合、当該スレーブ局が無効状態であれば、当該命令を実行しない。   Conventionally, numerical control is used in the field of machine tools. Patent Document 1 discloses a control system including a master station and a plurality of slave stations as a system using numerical control. The master station performs the following processing. The master station reads data corresponding to the system parameter file and the environment setting information when executing the control program. The master station determines whether each slave station is in a valid state based on the read data. When the instruction in the control program is an instruction for the slave station, the master station does not execute the instruction if the slave station is in an invalid state.

また、従来、生産ライン等ではシーケンス制御が用いられている。当該シーケンス制御には、プログラマブル・ロジック・コントローラ(PLC:Programmable Logic Controller)が利用される。PLCは、たとえば、ユーザプログラムを実行するマイクロプロセッサを含むCPU(Central Processing Unit)ユニット、外部のスイッチやセンサからの信号入力および外部のリレーやアクチュエータへの信号出力を担当するIO(Input Output)ユニットといった複数のユニットで構成される。それらのユニット間で、ユーザプログラム実行サイクルごとに、PLCシステムバスおよび/またはフィールドネットワークを経由してデータの授受をしながら、PLCは制御動作を実行する。   Conventionally, sequence control is used in production lines and the like. A programmable logic controller (PLC) is used for the sequence control. The PLC is, for example, a CPU (Central Processing Unit) unit including a microprocessor for executing a user program, an IO (Input Output) unit in charge of signal input from an external switch or sensor and signal output to an external relay or actuator. It is composed of a plurality of units. The PLC performs a control operation while exchanging data via the PLC system bus and / or the field network for each user program execution cycle between these units.

特開2004−192432号公報JP 2004-192432 A

しかしながら、従来では、マスタ局は、稼働中のスレーブ局の状態を有効および無効の間で切り替えることができない。   However, conventionally, the master station cannot switch the status of the slave station in operation between valid and invalid.

本願発明は、上記の問題点に鑑みなされたものであって、その目的は、稼働中のスレーブ装置(スレーブ局)の状態を有効および無効の間で切り替えることが可能な制御装置、制御方法、およびプログラムを提供することにある。   The present invention has been made in view of the above-described problems, and its purpose is a control device, a control method, and a control device capable of switching the state of an active slave device (slave station) between valid and invalid, And to provide a program.

本発明のある局面に従うと、制御装置は、マスタ装置として機能する。制御装置は、スレーブ側のシステムを構成する複数のスレーブ装置の各々と、ネットワークを介して通信するための通信部と、システムの構成に対応したユーザプログラムと、ユーザプログラムによって利用されるプログラムライブラリとを記憶した記憶部と、ユーザプログラムを実行するための実行部とを備える。プログラムライブラリに記憶されたプログラムは、スレーブ装置を無効な状態から有効な状態へ変更するための機能およびスレーブ装置を有効な状態から無効な状態へ変更するための機能のいずれか一方を実現する。ユーザプログラムには、複数のスレーブ装置を指定する記述と、記述されたスレーブ装置の状態を変更対象としてプログラムライブラリに記憶されたプログラムの実行を指示するための記述が含まれている。   According to an aspect of the present invention, the control device functions as a master device. The control device includes a plurality of slave devices configuring the slave side system, a communication unit for communicating via a network, a user program corresponding to the system configuration, and a program library used by the user program Are stored, and an execution unit for executing the user program. The program stored in the program library realizes one of a function for changing the slave device from an invalid state to an valid state and a function for changing the slave device from an valid state to an invalid state. The user program includes a description for specifying a plurality of slave devices and a description for instructing execution of a program stored in the program library with the state of the described slave devices as a change target.

好ましくは、記憶部は、システムの構成を表した構成情報をさらに記憶している。実行部は、構成情報を変更する処理を行なうことによって、いずれか一方の機能を実現する。   Preferably, the storage unit further stores configuration information representing the configuration of the system. The execution unit realizes one of the functions by performing a process of changing the configuration information.

好ましくは、制御装置は、モーション制御を行なう。プログラムライブラリには、スレーブ装置に割り付けられたモーション制御の制御対象である軸を無効な状態から有効な状態へ変更するための機能および軸を有効な状態から無効な状態へ変更するための機能のいずれか一方を実現するためのプログラムがさらに記憶されている。   Preferably, the control device performs motion control. The program library includes a function for changing the axis that is the target of motion control assigned to the slave device from an invalid state to a valid state, and a function for changing the axis from a valid state to an invalid state. A program for realizing either one is further stored.

好ましくは、実行部は、軸を有効な状態から無効な状態へ変更するための機能を実現するプログラムを実行した後に、スレーブ装置を有効な状態から無効な状態へ変更するための機能を実現するプログラムを実行する。   Preferably, the execution unit implements a function for changing the slave device from the valid state to the invalid state after executing a program for realizing a function for changing the axis from the valid state to the invalid state. Run the program.

好ましくは、ユーザプログラムの作成を行なうための支援装置からの指示に基づき、構成情報を変更する変更部をさらに備える。実行部は、構成情報が変更されたことに基づき、いずれか一方の機能を実現する。   Preferably, the information processing apparatus further includes a changing unit that changes the configuration information based on an instruction from the support device for creating the user program. The execution unit realizes one of the functions based on the change of the configuration information.

好ましくは、有効な状態は、定周期でリアルタイムの情報交換を行なうプロセスデータオブジェクトを使用した通信が可能な状態である。無効な状態は、プロセスデータオブジェクトを使用した通信が不可能な状態である。   Preferably, the valid state is a state in which communication using a process data object that performs real-time information exchange at a fixed period is possible. The invalid state is a state where communication using the process data object is impossible.

好ましくは、ネットワークは、EtherCAT(登録商標)ネットワークである。有効な状態は、オペレーショナル状態である。無効な状態は、オペレーショナル状態以外の状態である。   Preferably, the network is an EtherCAT® network. The valid state is the operational state. An invalid state is a state other than the operational state.

本発明の他の局面に従うと、制御装置は、スレーブとして接続されるスレーブ装置を制御するマスタ装置として機能する。制御装置は、ユーザプログラムと、ユーザプログラム内で呼び出されて、当該ユーザプログラム内で指定されたスレーブに対する有効指定または無効指定の情報に対応して、当該指定されたスレーブについて有効または無効を設定する設定プログラムとを記憶した記憶部と、ユーザプログラムを実行するための実行部と、を備える。   When the other situation of this invention is followed, a control apparatus functions as a master apparatus which controls the slave apparatus connected as a slave. The control device is called in the user program and the user program, and sets valid / invalid for the designated slave corresponding to the information of valid designation or invalid designation for the slave designated in the user program. A storage unit storing a setting program and an execution unit for executing the user program are provided.

好ましくは、制御装置は、スレーブ装置とネットワークを介して通信するための通信部を備える。実行部は、ユーザプログラムの実行により、設定プログラムで無効と設定されたスレーブに対して、当該スレーブへ無効と設定された情報を送り、または、当該スレーブに対してスレーブ装置を制御させない指令を送り、もしくは、当該スレーブに対してスレーブ装置を制御する情報を送らない。   Preferably, the control device includes a communication unit for communicating with the slave device via a network. The execution unit sends information set to invalid to the slave set to invalid by the execution of the user program, or sends an instruction not to control the slave device to the slave. Or, information for controlling the slave device is not sent to the slave.

本発明のさらに他の局面に従うと、制御方法は、スレーブ側のシステムを構成する複数のスレーブ装置の各々と、ネットワークを介して通信する、マスタ装置として機能する制御装置において実行される。制御方法は、システムの構成に対応した、各スレーブ装置を動作させるためのユーザプログラムを記憶するステップと、ユーザプログラムを実行するステップとを備える。制御装置は、ユーザプログラムによって利用されるプログラムライブラリを記憶している。プログラムライブラリに記憶されたプログラムは、スレーブ装置を無効な状態から有効な状態へ変更するための機能およびスレーブ装置を有効な状態から無効な状態へ変更するための機能のいずれか一方を実現する。ユーザプログラムには、複数のスレーブ装置を指定する記述と、記述されたスレーブ装置の状態を変更対象としてプログラムライブラリに記憶されたプログラムの実行を指示するための記述が含まれている。   According to still another aspect of the present invention, the control method is executed in a control device functioning as a master device that communicates with each of a plurality of slave devices constituting a slave-side system via a network. The control method includes a step of storing a user program for operating each slave device corresponding to the configuration of the system, and a step of executing the user program. The control device stores a program library used by the user program. The program stored in the program library realizes one of a function for changing the slave device from an invalid state to an valid state and a function for changing the slave device from an valid state to an invalid state. The user program includes a description for specifying a plurality of slave devices and a description for instructing execution of a program stored in the program library with the state of the described slave devices as a change target.

本発明のさらに他の局面に従うと、プログラムは、スレーブ側のシステムを構成する複数のスレーブ装置の各々と、ネットワークを介して通信する、マスタ装置として機能する制御装置を制御する。プログラムは、システムの構成に対応した、各スレーブ装置を動作させるためのユーザプログラムを記憶するステップと、ユーザプログラムを実行するステップとを、制御装置のプロセッサに実行させる。制御装置は、ユーザプログラムによって利用される予め定められたプログラムライブラリを記憶している。プログラムライブラリに記憶されたプログラムは、スレーブ装置を無効な状態から有効な状態へ変更するための機能およびスレーブ装置を有効な状態から無効な状態へ変更するための機能のいずれか一方を実現する。ユーザプログラムには、複数のスレーブ装置を指定する記述と、記述されたスレーブ装置の状態を変更対象としてプログラムライブラリに記憶されたプログラムの実行を指示するための記述が含まれている。   According to still another aspect of the present invention, the program controls a control device functioning as a master device that communicates with each of a plurality of slave devices constituting a slave-side system via a network. The program causes the processor of the control device to execute a step of storing a user program for operating each slave device corresponding to the system configuration and a step of executing the user program. The control device stores a predetermined program library used by the user program. The program stored in the program library realizes one of a function for changing the slave device from an invalid state to an valid state and a function for changing the slave device from an valid state to an invalid state. The user program includes a description for specifying a plurality of slave devices and a description for instructing execution of a program stored in the program library with the state of the described slave devices as a change target.

本発明によれば、稼働中のスレーブ装置の状態を有効および無効の間で切り替えることが可能となる。   According to the present invention, it is possible to switch the state of an active slave device between valid and invalid.

PLCシステムの概略構成を示す模式図である。It is a schematic diagram which shows schematic structure of a PLC system. PLCに記憶されるプログラムおよびデータを説明するための図である。It is a figure for demonstrating the program and data which are memorize | stored in PLC. PLCサポート装置において作成されるソース形式のユーザプログラムの一部を表した図である。It is a figure showing a part of user program of the source format produced in a PLC support apparatus. CPUユニットのハードウェア構成を示す模式図である。It is a schematic diagram which shows the hardware constitutions of CPU unit. CPUユニットで実行されるソフトウェア構成を示す模式図である。It is a schematic diagram which shows the software structure performed with a CPU unit. PLCの第1の適用例を説明するための図である。It is a figure for demonstrating the 1st example of application of PLC. PLCの第2の適用例を説明するための図である。It is a figure for demonstrating the 2nd example of application of PLC. PLCに記憶されるデータを説明するための図である。It is a figure for demonstrating the data memorize | stored in PLC. スレーブ装置の状態情報を説明するための図である。It is a figure for demonstrating the status information of a slave apparatus. スレーブ装置が無効となったときのスレーブ装置の仕様およびプロセスデータの仕様等を説明するための図である。It is a figure for demonstrating the specification of a slave apparatus, the specification of process data, etc. when a slave apparatus becomes invalid. プロセスデータを説明するための図である。It is a figure for demonstrating process data. スレーブ装置Cが有効であり、かつスレーブ装置Dが無効である場合における、スレーブ装置Cとスレーブ装置Dとのプロセスデータに対する処理を説明するための図である。FIG. 6 is a diagram for explaining processing on process data between the slave device C and the slave device D when the slave device C is valid and the slave device D is invalid. PLCとスレーブ装置との処理を説明するためのシーケンス図である。It is a sequence diagram for demonstrating the process with PLC and a slave apparatus. PLCとスレーブ装置との他の処理の説明するためのシーケンス図である。It is a sequence diagram for demonstrating the other process of PLC and a slave apparatus. 軸制御を行なう場合のソース形式のユーザプログラムの一部を表した図である。It is a figure showing a part of source form user program in the case of performing axis control. PLCの処理の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process of PLC. PLCの処理の他の例を説明するためのフローチャートである。It is a flowchart for demonstrating the other example of the process of PLC. PLCの機能的構成を説明するための機能ブロック図である。It is a functional block diagram for demonstrating the functional structure of PLC. CPUユニットに接続して用いられるPLCサポート装置のハードウェア構成を示す模式図である。It is a schematic diagram which shows the hardware constitutions of the PLC support apparatus used by connecting with a CPU unit. CPUユニットに接続して用いられるPLCサポート装置のソフトウェア構成を示す模式図である。It is a schematic diagram which shows the software structure of the PLC support apparatus used by connecting with a CPU unit. ソース形式のユーザプログラムの一部を表示した図である。It is the figure which displayed a part of user program of a source format.

本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰り返さない。   Embodiments of the present invention will be described in detail with reference to the drawings. In addition, about the same or equivalent part in a figure, the same code | symbol is attached | subjected and the description is not repeated.

<A.システム構成>
本実施の形態に係るPLCは、モータの運動を制御するためのモーション制御機能を有する。まず、図1を参照して、本実施の形態に係るPLC1のシステム構成について説明する。
<A. System configuration>
The PLC according to the present embodiment has a motion control function for controlling the motion of the motor. First, the system configuration of the PLC 1 according to the present embodiment will be described with reference to FIG.

図1は、本発明の実施の形態に係るPLCシステムの概略構成を示す模式図である。図1を参照して、PLCシステムSYSは、PLC1と、PLC1とフィールドネットワーク2を介して接続されるサーボモータドライバ3およびリモートIOターミナル5と、フィールド機器である検出スイッチ6およびリレー7とを含む。また、PLC1には、接続ケーブル10などを介してPLCサポート装置8が接続される。   FIG. 1 is a schematic diagram showing a schematic configuration of a PLC system according to an embodiment of the present invention. Referring to FIG. 1, PLC system SYS includes PLC 1, servo motor driver 3 and remote IO terminal 5 connected to PLC 1 via field network 2, detection switch 6 and relay 7 which are field devices. . The PLC support device 8 is connected to the PLC 1 via the connection cable 10 or the like.

PLC1は、主たる演算処理を実行するCPUユニット13と、1つ以上のIOユニット14と、特殊ユニット15とを含む。これらのユニットは、PLCシステムバス11を
介して、データを互いに遣り取りできるように構成される。また、これらのユニットには、電源ユニット12によって適切な電圧の電源が供給される。なお、PLC1として構成される各ユニットは、PLCメーカーが提供するものであるので、PLCシステムバス11は、一般にPLCメーカーごとに独自に開発され、使用されている。これに対して、後述するようにフィールドネットワーク2については、異なるメーカーの製品同士が接続できるように、その規格などが公開されている場合も多い。
The PLC 1 includes a CPU unit 13 that executes main arithmetic processing, one or more IO units 14, and a special unit 15. These units are configured to exchange data with each other via the PLC system bus 11. These units are supplied with power of an appropriate voltage by the power supply unit 12. Since each unit configured as the PLC 1 is provided by a PLC manufacturer, the PLC system bus 11 is generally developed and used independently for each PLC manufacturer. On the other hand, as will be described later, for the field network 2, the standards and the like are often disclosed so that products from different manufacturers can be connected to each other.

CPUユニット13の詳細については、図2を参照して後述する。
IOユニット14は、一般的な入出力処理に関するユニットであり、オン/オフといった2値化されたデータの入出力を司る。すなわち、IOユニット14は、検出スイッチ6などのセンサが何らかの対象物を検出している状態(オン)および何らの対象物も検出していない状態(オフ)のいずれであるかという情報を収集する。また、IOユニット14は、リレー7やアクチュエータといった出力先に対して、活性化するための指令(オン)および不活性化するための指令(オフ)のいずれかを出力する。
Details of the CPU unit 13 will be described later with reference to FIG.
The IO unit 14 is a unit related to general input / output processing, and controls input / output of binarized data such as on / off. In other words, the IO unit 14 collects information indicating whether a sensor such as the detection switch 6 is detecting a certain object (on) or not detecting any object (off). . In addition, the IO unit 14 outputs either an activation command (ON) or an inactivation command (OFF) to an output destination such as the relay 7 or the actuator.

特殊ユニット15は、アナログデータの入出力、温度制御、特定の通信方式による通信といった、IOユニット14ではサポートしない機能を有する。   The special unit 15 has functions not supported by the IO unit 14 such as input / output of analog data, temperature control, and communication using a specific communication method.

フィールドネットワーク2は、CPUユニット13と遣り取りされる各種データを伝送する。フィールドネットワーク2としては、典型的には、各種の産業用イーサネット(登録商標)を用いることができる。産業用イーサネット(登録商標)としては、たとえば、EtherCAT(登録商標)、Profinet IRT、MECHATROLINK(登録商標)−III、Powerlink、SERCOS(登録商標)−III、CIP Motionなどが知られており、これらのうちのいずれを採用してもよい。さらに、産業用イーサネット(登録商標)以外のフィールドネットワークを用いてもよい。たとえば、モーション制御を行わない場合であれば、DeviceNet、CompoNet/IP(登録商標)などを用いてもよい。本実施の形態に係るPLCシステムSYSでは、典型的に、本実施の形態においては、産業用イーサネット(登録商標)であるEtherCAT(登録商標)をフィールドネットワーク2として採用する場合の構成について例示する。   The field network 2 transmits various data exchanged with the CPU unit 13. As the field network 2, various types of industrial Ethernet (registered trademark) can be typically used. As industrial Ethernet (registered trademark), for example, EtherCAT (registered trademark), Profinet IRT, MECHATROLINK (registered trademark) -III, Powerlink, SERCOS (registered trademark) -III, CIP Motion, etc. are known. Any of them may be adopted. Further, a field network other than industrial Ethernet (registered trademark) may be used. For example, if the motion control is not performed, DeviceNet, CompoNet / IP (registered trademark), or the like may be used. The PLC system SYS according to the present embodiment typically exemplifies a configuration in the case where EtherCAT (registered trademark), which is an industrial Ethernet (registered trademark), is employed as the field network 2 in the present embodiment.

なお、図1には、PLCシステムバス11およびフィールドネットワーク2の両方を有するPLCシステムSYSを例示するが、一方のみを搭載するシステム構成を採用することもできる。たとえば、フィールドネットワーク2ですべてのユニットを接続してもよい。あるいは、フィールドネットワーク2を使用せずに、サーボモータドライバ3をPLCシステムバス11に直接接続してもよい。さらに、フィールドネットワーク2の通信ユニットをPLCシステムバス11に接続し、CPUユニット13から当該通信ユニット経由で、フィールドネットワーク2に接続された機器との間の通信を行なうようにしてもよい。   1 illustrates a PLC system SYS having both the PLC system bus 11 and the field network 2, but a system configuration in which only one of them is mounted may be employed. For example, all units may be connected by the field network 2. Alternatively, the servo motor driver 3 may be directly connected to the PLC system bus 11 without using the field network 2. Further, a communication unit of the field network 2 may be connected to the PLC system bus 11 so that the CPU unit 13 communicates with a device connected to the field network 2 via the communication unit.

サーボモータドライバ3は、フィールドネットワーク2を介してCPUユニット13と接続されるとともに、CPUユニット13からの指令値に従ってサーボモータ4を駆動する。より具体的には、サーボモータドライバ3は、PLC1から一定周期で、位置指令値、速度指令値、トルク指令値といった指令値を受ける。また、サーボモータドライバ3は、サーボモータ4の軸に接続されている位置センサ(ロータリーエンコーダ)やトルクセンサといった検出器から、位置、速度(典型的には、今回位置と前回位置との差から算出される)、トルクといったサーボモータ4の動作に係る実測値を取得する。そして、サーボモータドライバ3は、CPUユニット13からの指令値を目標値に設定し、実測値をフィードバック値として、フィードバック制御を行なう。すなわち、サーボモータドライバ3は、実測値が目標値に近づくようにサーボモータ4を駆動するための電流を調整する。
なお、サーボモータドライバ3は、サーボモータアンプと称されることもある。
The servo motor driver 3 is connected to the CPU unit 13 via the field network 2 and drives the servo motor 4 according to a command value from the CPU unit 13. More specifically, the servo motor driver 3 receives command values such as a position command value, a speed command value, and a torque command value from the PLC 1 at a constant cycle. The servo motor driver 3 receives a position and speed (typically from the difference between the current position and the previous position) from a detector such as a position sensor (rotary encoder) or torque sensor connected to the shaft of the servo motor 4. (Calculated), an actual measurement value related to the operation of the servo motor 4 such as torque is acquired. Then, the servo motor driver 3 sets a command value from the CPU unit 13 as a target value, and performs feedback control using the actually measured value as a feedback value. That is, the servo motor driver 3 adjusts the current for driving the servo motor 4 so that the actual measurement value approaches the target value.
The servo motor driver 3 may be referred to as a servo motor amplifier.

また、図1には、サーボモータ4とサーボモータドライバ3とを組み合わせたシステム例を示すが、その他の構成、たとえば、パルスモータとパルスモータドライバとを組み合わせたシステムを採用することもできる。   1 shows a system example in which the servo motor 4 and the servo motor driver 3 are combined, but other configurations, for example, a system in which a pulse motor and a pulse motor driver are combined may be employed.

図1に示すPLCシステムSYSのフィールドネットワーク2には、さらに、リモートIOターミナル5が接続されている。リモートIOターミナル5は、基本的には、IOユニット14と同様に、一般的な入出力処理に関する処理を行なう。より具体的には、リモートIOターミナル5は、フィールドネットワーク2でのデータ伝送に係る処理を行なうための通信カプラ52と、1つ以上のIOユニット53とを含む。これらのユニットは、リモートIOターミナルバス51を介して、データを互いに遣り取りできるように構成される。   A remote IO terminal 5 is further connected to the field network 2 of the PLC system SYS shown in FIG. The remote IO terminal 5 basically performs processing related to general input / output processing in the same manner as the IO unit 14. More specifically, the remote IO terminal 5 includes a communication coupler 52 for performing processing related to data transmission in the field network 2 and one or more IO units 53. These units are configured to exchange data with each other via the remote IO terminal bus 51.

PLCシステムSYSにおいては、PLC1のCPUユニット13がEtherCATにおけるマスタ装置として機能し、サーボモータドライバ3および通信カプラ52がEtherCATにおけるスレーブ装置として機能する。なお、CPUユニット13の代わりに、マスタ装置として機能するユニットを設けてもよい。   In the PLC system SYS, the CPU unit 13 of the PLC 1 functions as a master device in EtherCAT, and the servo motor driver 3 and the communication coupler 52 function as slave devices in EtherCAT. Instead of the CPU unit 13, a unit that functions as a master device may be provided.

また、PLCシステムSYSが導入される機械としては、たとえば、移動用チャンバと複数の処理用チャンバとを備えたウェーハカセット、包装機、マスキング装置、焼成炉が挙げられる。   Examples of the machine into which the PLC system SYS is introduced include a wafer cassette, a packaging machine, a masking device, and a baking furnace provided with a movement chamber and a plurality of processing chambers.

なお、PLCサポート装置8については後述する。
<B.処理の概要>
次に、PLC1において行われる処理の概要について説明する。
The PLC support device 8 will be described later.
<B. Outline of processing>
Next, an outline of processing performed in the PLC 1 will be described.

図2は、PLC1に記憶されるプログラムおよびデータを説明するための図である。図2(A)は、PLCサポート装置8がプロジェクト270をPLC1に転送する前の状態を表した図である。図2(B)は、PLCサポート装置8がプロジェクト270をPLC1に送信した後のPLC1の状態を表した図である。   FIG. 2 is a diagram for explaining programs and data stored in the PLC 1. FIG. 2A is a diagram showing a state before the PLC support device 8 transfers the project 270 to the PLC 1. FIG. 2B is a diagram illustrating a state of the PLC 1 after the PLC support device 8 transmits the project 270 to the PLC 1.

図2(A)を参照して、PLCサポート装置8のユーザは、PLCサポート装置8においてプロジェクト270を生成する。プロジェクト270は、ユーザプログラム236、システム構成(デバイス構成)を表すシステム構成情報240、変数テーブル250等が含まれたファイルである。ユーザプログラム236は、ユーザが操作画面で作成したソース形式のユーザプログラム330(図3,図20)をコンパイルすることにより得られた、実行可能なオブジェクトプログラム形式のプログラムである。   Referring to FIG. 2A, the user of PLC support device 8 generates project 270 in PLC support device 8. The project 270 is a file including a user program 236, system configuration information 240 representing a system configuration (device configuration), a variable table 250, and the like. The user program 236 is an executable object program format program obtained by compiling the source format user program 330 (FIGS. 3 and 20) created by the user on the operation screen.

ユーザプログラム330,236には、スレーブ装置をEtherCATにおいて有効な状態にする(以下、単に「スレーブ装置を有効にする」と記載する)ための命令を実行するための記述と、スレーブ装置をEtherCATにおいて無効な状態にする(以下、単に「スレーブ装置を無効にする」と記載する)ための命令を実行するための記述とを含めることができる。また、ユーザプログラム330,236には、スレーブ装置に割り付けられた軸を有効にするための命令を実行するための記述と、スレーブ装置に割り付けられた軸を無効にするための命令を実行するための記述とをさらに含めることができる。   The user programs 330 and 236 include a description for executing a command for setting the slave device in an effective state in EtherCAT (hereinafter simply described as “enabling the slave device”), and a slave device in the EtherCAT. A description for executing an instruction to make the state invalid (hereinafter simply described as “invalidating the slave device”) can be included. Further, in the user programs 330 and 236, a description for executing an instruction for validating the axis assigned to the slave device and an instruction for invalidating the axis assigned to the slave device are executed. Can be further included.

スレーブ装置の「無効」とは、マスタ装置であるPLC1とデータ通信を行うことを無視(don't care)することを意味する。「無効」状態においては、登録されている識別情報に一致する識別情報を有するスレーブ装置がフィールドネットワーク2に接続されているか否かについても判断されない。これに対して、スレーブ装置の「有効」とは、マスタ装置であるPLC1とデータ通信を行うことが予定されていることを意味する。そのため、「有効」状態においては、登録されている識別情報に一致する識別情報を有するスレーブ装置がフィールドネットワーク2に接続されていなければ、エラーと判断される。   “Invalid” of the slave device means that data communication with the master device PLC 1 is ignored. In the “invalid” state, it is not determined whether or not a slave device having identification information that matches the registered identification information is connected to the field network 2. On the other hand, “valid” of the slave device means that data communication with the master device PLC 1 is scheduled. Therefore, in the “valid” state, if a slave device having identification information that matches the registered identification information is not connected to the field network 2, it is determined as an error.

「軸」とは、モーション制御の対象を意味する。軸には、EtherCATで接続するサーボモータドライバ(たとえば、図1におけるサーボモータドライバ3)、エンコーダ等がある。つまり、サーボモータドライバ3は、PLC1についてのスレーブ装置であり、かつ軸でもある。「軸を無効にする」とは、軸の動作を停止状態に移行させることをいう。「軸を無効にする」とは、制御できない状態にすることを言う。   “Axis” means an object of motion control. The shaft includes a servo motor driver (for example, servo motor driver 3 in FIG. 1) and an encoder connected by EtherCAT. That is, the servo motor driver 3 is a slave device and a shaft for the PLC 1. “Disabling the axis” means shifting the axis operation to the stop state. “Disabling the axis” means making the control impossible.

「スレーブ装置に軸を割り付ける」とは、後述する変数テーブル250(図8(b))における変数(たとえば、Group1−X)に、フィールドネットワーク2におけるスレーブ装置(つまり、システム構成情報240におけるスレーブ装置)のノード番号を対応付けることを意味する。   “Assign an axis to a slave device” means a slave device in the field network 2 (that is, a slave device in the system configuration information 240) in a variable (for example, Group 1-X) in a variable table 250 (FIG. 8B) described later. ) Is associated with the node number.

PLC1は、ユーザプログラム236を実行するときに利用するライブラリ280を記憶している。ライブラリ280は、複数のプログラム281,282,283,284,…を含む。プログラム281は、スレーブ装置を有効にするための機能を実現する。プログラム282は、スレーブ装置を無効にするための機能を実現する。プログラム283は、スレーブ装置に割り付けられた軸を有効にするための機能を実現する。プログラム284は、スレーブ装置に割り付けられた軸を無効にするための機能を実現する。   The PLC 1 stores a library 280 that is used when the user program 236 is executed. The library 280 includes a plurality of programs 281, 282, 283, 284,. The program 281 implements a function for enabling the slave device. The program 282 implements a function for invalidating the slave device. The program 283 implements a function for validating the axis assigned to the slave device. The program 284 implements a function for invalidating the axis assigned to the slave device.

図2(B)を参照して、プロジェクト270がPLCサポート装置8からPLC1に送信されることによって、PLC1には、ライブラリ280とともに、プロジェクト270が記憶される。PLC1は、ライブラリ280、システム構成情報240、および変数テーブル250を用いて、ユーザプログラム236を実行する。   Referring to FIG. 2B, when project 270 is transmitted from PLC support device 8 to PLC 1, project 270 is stored in PLC 1 together with library 280. The PLC 1 executes the user program 236 using the library 280, the system configuration information 240, and the variable table 250.

図3は、PLCサポート装置8において作成されるソース形式のユーザプログラム330の一部を表した図である。図3を参照して、ユーザプログラム330には、スレーブ装置を有効にするための機能を実現するためのプログラム281の実行を指示するための記述291が含まれている。ユーザプログラム330においては、プログラム281は、PLC1におけるディップスイッチの位置が予め定められた位置P1であることを条件に実行される。また、コンパイル後のユーザプログラム236にも、ユーザプログラム330と同様に、オブジェクトプログラム形式で、プログラム281の実行を指示するための記述が含まれる。   FIG. 3 is a diagram showing a part of the user program 330 in the source format created in the PLC support device 8. Referring to FIG. 3, user program 330 includes a description 291 for instructing execution of program 281 for realizing a function for enabling the slave device. In the user program 330, the program 281 is executed on condition that the position of the dip switch in the PLC 1 is a predetermined position P1. The compiled user program 236 also includes a description for instructing the execution of the program 281 in the object program format, as with the user program 330.

なお、スレーブ装置Cが有効になった後は、記述291以降に記述された各処理(ロジック)が実行される。   Note that after the slave device C becomes valid, each process (logic) described after the description 291 is executed.

PLC1は、図3に示したユーザプログラム330をコンパイルしたユーザプログラム236を実行することにより、ディップスイッチが第1の位置であることを条件に、無効なスレーブ装置Cを有効なスレーブ装置に切り替える処理を実行する。   The PLC 1 executes the user program 236 obtained by compiling the user program 330 shown in FIG. 3 to switch the invalid slave device C to the valid slave device on the condition that the dip switch is at the first position. Execute.

また、図3には示していないが、ユーザプログラム330には、有効なスレーブ装置Cを無効にするための機能を実現するためのプログラム282の実行を指示するための記述が含まれている。ユーザプログラム330においては、プログラム282は、ディップスイッチの位置が位置P1と異なる位置P2であることを条件に実行される。PLC1は、ユーザプログラム330をコンパイルしたユーザプログラム236を実行することにより、ディップスイッチが第2の位置であることを条件に、有効なスレーブ装置Cを無効なスレーブ装置に切り替える処理を実行する。   Although not shown in FIG. 3, the user program 330 includes a description for instructing the execution of the program 282 for realizing a function for invalidating the valid slave device C. In the user program 330, the program 282 is executed on condition that the position of the dip switch is a position P2 different from the position P1. The PLC 1 executes a user program 236 obtained by compiling the user program 330, thereby executing a process of switching the valid slave device C to an invalid slave device on the condition that the dip switch is in the second position.

以上のように、PLC1は、フィールドネットワーク2によって接続された稼働中のスレーブ装置に対して、ユーザプログラム236から無効な状態から有効な状態への切り替え、または有効な状態から無効な状態への切り替えを行なうことができる。   As described above, the PLC 1 switches the active slave device connected by the field network 2 from the invalid state to the valid state from the user program 236, or switches from the valid state to the invalid state. Can be performed.

<C.CPUユニット>
(c1.ハードウェア構成)
次に、図4を参照して、CPUユニット13のハードウェア構成について説明する。図4は、本発明の実施の形態に係るCPUユニット13のハードウェア構成を示す模式図である。図4を参照して、CPUユニット13は、マイクロプロセッサ100と、チップセット102と、メインメモリ104と、不揮発性メモリ106と、システムタイマ108と、PLCシステムバスコントローラ120と、フィールドネットワークコントローラ140と、USBコネクタ110とを含む。チップセット102と他のコンポーネントとの間は、各種のバスを介してそれぞれ結合されている。
<C. CPU unit>
(C1. Hardware configuration)
Next, the hardware configuration of the CPU unit 13 will be described with reference to FIG. FIG. 4 is a schematic diagram showing a hardware configuration of the CPU unit 13 according to the embodiment of the present invention. Referring to FIG. 4, CPU unit 13 includes a microprocessor 100, a chip set 102, a main memory 104, a nonvolatile memory 106, a system timer 108, a PLC system bus controller 120, and a field network controller 140. USB connector 110. The chip set 102 and other components are coupled via various buses.

マイクロプロセッサ100およびチップセット102は、典型的には、汎用的なコンピュータアーキテクチャに準じて構成される。すなわち、マイクロプロセッサ100は、チップセット102から内部クロックに従って順次供給される命令コードを解釈して実行する。チップセット102は、接続されている各種コンポーネントとの間で内部的なデータを遣り取りするとともに、マイクロプロセッサ100に必要な命令コードを生成する。さらに、チップセット102は、マイクロプロセッサ100での演算処理の実行の結果得られたデータなどをキャッシュする機能を有する。   The microprocessor 100 and the chipset 102 are typically configured according to a general-purpose computer architecture. That is, the microprocessor 100 interprets and executes the instruction codes sequentially supplied from the chip set 102 according to the internal clock. The chip set 102 exchanges internal data with various connected components and generates instruction codes necessary for the microprocessor 100. Further, the chip set 102 has a function of caching data obtained as a result of execution of arithmetic processing in the microprocessor 100.

CPUユニット13は、記憶手段として、メインメモリ104および不揮発性メモリ106を有する。   The CPU unit 13 includes a main memory 104 and a nonvolatile memory 106 as storage means.

メインメモリ104は、揮発性の記憶領域(RAM)であり、CPUユニット13への電源投入後にマイクロプロセッサ100で実行されるべき各種プログラムを保持する。また、メインメモリ104は、マイクロプロセッサ100による各種プログラムの実行時の作業用メモリとしても使用される。このようなメインメモリ104としては、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)といった
デバイスが用いられる。
The main memory 104 is a volatile storage area (RAM), and holds various programs to be executed by the microprocessor 100 after the power to the CPU unit 13 is turned on. The main memory 104 is also used as a working memory when the microprocessor 100 executes various programs. As such a main memory 104, a device such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory) is used.

一方、不揮発性メモリ106は、リアルタイムOS(Operating System)、PLC1のシステムプログラム、ユーザプログラム、モーション演算プログラム、システム設定パラメータといったデータを不揮発的に保持する。これらのプログラムやデータは、必要に応じて、マイクロプロセッサ100がアクセスできるようにメインメモリ104にコピーされる。このような不揮発性メモリ106としては、フラッシュメモリのような半導体メモリを用いることができる。あるいは、ハードディスクドライブのような磁気記録媒体や、DVD−RAM(Digital Versatile Disk Random Access Memory)のような光学記録媒
体などを用いることもできる。
On the other hand, the nonvolatile memory 106 holds data such as a real-time OS (Operating System), a system program of the PLC 1, a user program, a motion calculation program, and system setting parameters in a nonvolatile manner. These programs and data are copied to the main memory 104 so that the microprocessor 100 can access them as necessary. As such a nonvolatile memory 106, a semiconductor memory such as a flash memory can be used. Alternatively, a magnetic recording medium such as a hard disk drive or an optical recording medium such as a DVD-RAM (Digital Versatile Disk Random Access Memory) can be used.

システムタイマ108は、一定周期ごとに割り込み信号を発生してマイクロプロセッサ100に提供する。典型的には、ハードウェアの仕様によって、複数の異なる周期でそれぞれ割り込み信号を発生するように構成されるが、OS(Operating System)やBIOS(Basic Input Output System)などによって、任意の周期で割り込み信号を発生するように設定することもできる。このシステムタイマ108が発生する割り込み信号を利用して、後述するようなモーション制御サイクルごとの制御動作が実現される。   The system timer 108 generates an interrupt signal at regular intervals and provides it to the microprocessor 100. Typically, it is configured to generate an interrupt signal at a plurality of different periods depending on the hardware specifications, but interrupts at an arbitrary period depending on the OS (Operating System), BIOS (Basic Input Output System), etc. It can also be set to generate a signal. Using the interrupt signal generated by the system timer 108, a control operation for each motion control cycle as described later is realized.

CPUユニット13は、通信回路として、PLCシステムバスコントローラ120およびフィールドネットワークコントローラ140を有する。   The CPU unit 13 includes a PLC system bus controller 120 and a field network controller 140 as communication circuits.

バッファメモリ126は、PLCシステムバス11を介して他のユニットへ出力されるデータ(以下「出力データ」とも称す。)の送信バッファ、および、PLCシステムバス11を介して他のユニットから入力されるデータ(以下「入力データ」とも称す。)の受信バッファとして機能する。なお、マイクロプロセッサ100による演算処理によって作成された出力データは、原始的にはメインメモリ104に格納される。そして、特定のユニットへ転送されるべき出力データは、メインメモリ104から読み出されて、バッファメモリ126に一次的に保持される。また、他のユニットから転送された入力データは、バッファメモリ126に一次的に保持された後、メインメモリ104に移される。   The buffer memory 126 is a transmission buffer for data output to other units via the PLC system bus 11 (hereinafter also referred to as “output data”), and is input from other units via the PLC system bus 11. It functions as a data reception buffer (hereinafter also referred to as “input data”). The output data created by the arithmetic processing by the microprocessor 100 is stored in the main memory 104 originally. Output data to be transferred to a specific unit is read from the main memory 104 and temporarily held in the buffer memory 126. Input data transferred from other units is temporarily stored in the buffer memory 126 and then transferred to the main memory 104.

DMA制御回路122は、メインメモリ104からバッファメモリ126への出力データの転送、および、バッファメモリ126からメインメモリ104への入力データの転送を行なう。   The DMA control circuit 122 transfers output data from the main memory 104 to the buffer memory 126 and transfers input data from the buffer memory 126 to the main memory 104.

PLCシステムバス制御回路124は、PLCシステムバス11に接続される他のユニットとの間で、バッファメモリ126の出力データを送信する処理および入力データを受信してバッファメモリ126に格納する処理を行なう。典型的には、PLCシステムバス制御回路124は、PLCシステムバス11における物理層およびデータリンク層の機能を提供する。   The PLC system bus control circuit 124 performs processing for transmitting output data of the buffer memory 126 and processing for receiving input data and storing it in the buffer memory 126 with other units connected to the PLC system bus 11. . Typically, the PLC system bus control circuit 124 provides functions of a physical layer and a data link layer in the PLC system bus 11.

フィールドネットワークコントローラ140は、フィールドネットワーク2を介したデータの遣り取りを制御する。すなわち、フィールドネットワークコントローラ140は、用いられるフィールドネットワーク2の規格に従い、出力データの送信および入力データの受信を制御する。上述したように、本実施の形態においてはEtherCAT(登録商標)規格に従うフィールドネットワーク2が採用されるので、通常のイーサネット(登録商標)通信を行なうためのハードウェアを含む、フィールドネットワークコントローラ140が用いられる。EtherCAT(登録商標)規格では、通常のイーサネット(登録商標)規格に従う通信プロトコルを実現する一般的なイーサネット(登録商標)コントローラを利用できる。但し、フィールドネットワーク2として採用される産業用イーサネット(登録商標)の種類によっては、通常の通信プロトコルとは異なる専用仕様の通信プロトコルに対応した特別仕様のイーサネット(登録商標)コントローラが用いられる。また、産業用イーサネット(登録商標)以外のフィールドネットワークを採用した場合には、当該規格に応じた専用のフィールドネットワークコントローラが用いられる。   The field network controller 140 controls data exchange through the field network 2. That is, the field network controller 140 controls transmission of output data and reception of input data according to the standard of the field network 2 to be used. As described above, since the field network 2 conforming to the EtherCAT (registered trademark) standard is adopted in the present embodiment, the field network controller 140 including hardware for performing normal Ethernet (registered trademark) communication is used. It is done. In the EtherCAT (registered trademark) standard, a general Ethernet (registered trademark) controller that realizes a communication protocol according to the normal Ethernet (registered trademark) standard can be used. However, depending on the type of industrial Ethernet (registered trademark) employed as the field network 2, a special specification Ethernet (registered trademark) controller corresponding to a dedicated communication protocol different from the normal communication protocol is used. When a field network other than industrial Ethernet (registered trademark) is adopted, a dedicated field network controller corresponding to the standard is used.

DMA制御回路142は、メインメモリ104からバッファメモリ146への出力データの転送、および、バッファメモリ146からメインメモリ104への入力データの転送を行なう。   The DMA control circuit 142 transfers output data from the main memory 104 to the buffer memory 146 and transfers input data from the buffer memory 146 to the main memory 104.

フィールドネットワーク制御回路144は、フィールドネットワーク2に接続される他の装置との間で、バッファメモリ146の出力データを送信する処理および入力データを
受信してバッファメモリ146に格納する処理を行なう。典型的には、フィールドネットワーク制御回路144は、フィールドネットワーク2における物理層およびデータリンク層の機能を提供する。
The field network control circuit 144 performs processing for transmitting output data from the buffer memory 146 and processing for receiving input data and storing it in the buffer memory 146 with other devices connected to the field network 2. Typically, the field network control circuit 144 provides physical layer and data link layer functions in the field network 2.

USBコネクタ110は、PLCサポート装置8とCPUユニット13とを接続するためのインターフェイスである。典型的には、PLCサポート装置8から転送される、CPUユニット13のマイクロプロセッサ100で実行可能なプログラムなどは、USBコネクタ110を介してPLC1に取込まれる。   The USB connector 110 is an interface for connecting the PLC support device 8 and the CPU unit 13. Typically, a program that can be executed by the microprocessor 100 of the CPU unit 13 and transferred from the PLC support device 8 is taken into the PLC 1 via the USB connector 110.

(c2.ソフトウェア構成)
次に、図5を参照して、本実施の形態に係る各種機能を提供するためのソフトウェア群について説明する。これらのソフトウェアに含まれる命令コードは、適切なタイミングで読み出され、CPUユニット13のマイクロプロセッサ100によって実行される。
(C2. Software configuration)
Next, a software group for providing various functions according to the present embodiment will be described with reference to FIG. The instruction codes included in these software are read at an appropriate timing and executed by the microprocessor 100 of the CPU unit 13.

図5は、本発明の実施の形態に係るCPUユニット13で実行されるソフトウェア構成を示す模式図である。図5を参照して、CPUユニット13で実行されるソフトウェアとしては、リアルタイムOS200と、システムプログラム210と、ユーザプログラム236との3階層になっている。   FIG. 5 is a schematic diagram showing a software configuration executed by the CPU unit 13 according to the embodiment of the present invention. Referring to FIG. 5, the software executed by CPU unit 13 has three layers of real-time OS 200, system program 210, and user program 236.

リアルタイムOS200は、CPUユニット13のコンピュータアーキテクチャに応じて設計されており、マイクロプロセッサ100がシステムプログラム210およびユーザプログラム236を実行するための基本的な実行環境を提供する。このリアルタイムOSは、典型的には、PLCのメーカーあるいは専門のソフトウェア会社などによって提供される。   The real-time OS 200 is designed according to the computer architecture of the CPU unit 13 and provides a basic execution environment for the microprocessor 100 to execute the system program 210 and the user program 236. This real-time OS is typically provided by a PLC manufacturer or a specialized software company.

システムプログラム210は、PLC1としての機能を提供するためのソフトウェア群である。具体的には、システムプログラム210は、スケジューラプログラム212と、出力処理プログラム214と、入力処理プログラム216と、シーケンス命令演算プログラム232と、モーション演算プログラム234と、その他のシステムプログラム220とを含む。なお、一般には出力処理プログラム214および入力処理プログラム216は、連続的(一体として)に実行されるので、これらのプログラムを、IO処理プログラム218と総称する場合もある。   The system program 210 is a software group for providing a function as the PLC 1. Specifically, the system program 210 includes a scheduler program 212, an output processing program 214, an input processing program 216, a sequence command operation program 232, a motion operation program 234, and other system programs 220. In general, the output processing program 214 and the input processing program 216 are executed continuously (integrally), so these programs may be collectively referred to as an IO processing program 218.

ユーザプログラム236は、ユーザにおける制御目的に応じて作成される。すなわち、PLCシステムSYSを用いて制御する対象のライン(プロセス)などに応じて、任意に設計されるプログラムである。   The user program 236 is created according to the control purpose of the user. In other words, the program is arbitrarily designed according to the line (process) to be controlled using the PLC system SYS.

後述するように、ユーザプログラム236は、シーケンス命令演算プログラム232およびモーション演算プログラム234と協働して、ユーザにおける制御目的を実現する。すなわち、ユーザプログラム236は、シーケンス命令演算プログラム232およびモーション演算プログラム234によって提供される命令、関数、機能モジュールなどを利用することで、プログラムされた動作を実現する。そのため、ユーザプログラム236、シーケンス命令演算プログラム232、およびモーション演算プログラム234を、制御プログラム230と総称する場合もある。   As will be described later, the user program 236 realizes the control purpose of the user in cooperation with the sequence command calculation program 232 and the motion calculation program 234. That is, the user program 236 implements programmed operations by using instructions, functions, function modules, and the like provided by the sequence instruction calculation program 232 and the motion calculation program 234. Therefore, the user program 236, the sequence command calculation program 232, and the motion calculation program 234 may be collectively referred to as the control program 230.

このように、CPUユニット13のマイクロプロセッサ100は、記憶手段に格納されたシステムプログラム210およびユーザプログラム236を実行する。   As described above, the microprocessor 100 of the CPU unit 13 executes the system program 210 and the user program 236 stored in the storage unit.

以下、各プログラムについてより詳細に説明する。
ユーザプログラム236は、上述したように、ユーザにおける制御目的(たとえば、対
象のラインやプロセス)に応じて作成される。ユーザプログラム236は、典型的には、CPUユニット13のマイクロプロセッサ100で実行可能なオブジェクトプログラム形式になっている。このユーザプログラム236は、PLCサポート装置8などにおいて、ラダー言語などによって記述されたソースプログラムがコンパイルされることで生成される。そして、生成されたオブジェクトプログラム形式のユーザプログラム236は、PLCサポート装置8から接続ケーブル10を介してCPUユニット13へ転送され、不揮発性メモリ106などに格納される。
Hereinafter, each program will be described in more detail.
As described above, the user program 236 is created according to a control purpose (for example, a target line or process) by the user. The user program 236 is typically in the form of an object program that can be executed by the microprocessor 100 of the CPU unit 13. The user program 236 is generated by compiling a source program described in a ladder language or the like in the PLC support device 8 or the like. Then, the generated user program 236 in the object program format is transferred from the PLC support device 8 to the CPU unit 13 via the connection cable 10 and stored in the nonvolatile memory 106 or the like.

スケジューラプログラム212は、出力処理プログラム214、入力処理プログラム216、および制御プログラム230について、各実行サイクルでの処理開始および処理中断後の処理再開を制御する。より具体的には、スケジューラプログラム212は、ユーザプログラム236およびモーション演算プログラム234の実行を制御する。   For the output processing program 214, the input processing program 216, and the control program 230, the scheduler program 212 controls the processing start in each execution cycle and the processing restart after the processing is interrupted. More specifically, the scheduler program 212 controls the execution of the user program 236 and the motion calculation program 234.

本実施の形態に係るCPUユニット13では、モーション演算プログラム234に適した一定周期の実行サイクル(モーション制御サイクル)を処理全体の共通サイクルとして採用する。そのため、1つのモーション制御サイクル内で、すべての処理を完了することは難しいので、実行すべき処理の優先度などに応じて、各モーション制御サイクルにおいて実行を完了すべき処理と、複数のモーション制御サイクルに亘って実行してもよい処理とが区分される。スケジューラプログラム212は、これらの区分された処理の実行順序などを管理する。より具体的には、スケジューラプログラム212は、各モーション制御サイクル期間内において、より高い優先度が与えられているプログラムほど先に実行する。   In the CPU unit 13 according to the present embodiment, a constant execution cycle (motion control cycle) suitable for the motion calculation program 234 is adopted as a common cycle for the entire processing. Therefore, it is difficult to complete all processes within one motion control cycle. Therefore, depending on the priority of the process to be executed, the process to be executed in each motion control cycle and multiple motion controls A process that can be executed over a cycle is distinguished. The scheduler program 212 manages the execution order of these divided processes. More specifically, the scheduler program 212 executes a program having a higher priority first in each motion control cycle period.

出力処理プログラム214は、ユーザプログラム236(制御プログラム230)の実行によって生成された出力データを、PLCシステムバスコントローラ120および/またはフィールドネットワークコントローラ140へ転送するのに適した形式に再配置する。PLCシステムバスコントローラ120またはフィールドネットワークコントローラ140が、マイクロプロセッサ100からの、送信を実行するための指示を必要とする場合は、出力処理プログラム214がそのような指示を発行する。   The output processing program 214 rearranges the output data generated by execution of the user program 236 (control program 230) into a format suitable for transfer to the PLC system bus controller 120 and / or the field network controller 140. When the PLC system bus controller 120 or the field network controller 140 requires an instruction from the microprocessor 100 to execute transmission, the output processing program 214 issues such an instruction.

入力処理プログラム216は、PLCシステムバスコントローラ120および/またはフィールドネットワークコントローラ140によって受信された入力データを、制御プログラム230が使用するのに適した形式に再配置する。   The input processing program 216 rearranges the input data received by the PLC system bus controller 120 and / or the field network controller 140 into a form suitable for use by the control program 230.

シーケンス命令演算プログラム232は、ユーザプログラム236で使用されるある種のシーケンス命令が実行されるときに呼び出されて、その命令の内容を実現するために実行されるプログラムである。図2に示したライブラリ280における上述したプログラム281,282,283,284は、シーケンス命令演算プログラム232に含まれる。   The sequence instruction calculation program 232 is a program that is called when a certain sequence instruction used in the user program 236 is executed and executed to realize the contents of the instruction. The above-described programs 281, 282, 283, and 284 in the library 280 shown in FIG. 2 are included in the sequence instruction calculation program 232.

モーション演算プログラム234は、ユーザプログラム236による指示に従って実行され、サーボモータドライバ3やパルスモータドライバといったモータドライバに対して出力する指令値を算出するプログラムである。   The motion calculation program 234 is a program that is executed in accordance with an instruction from the user program 236 and calculates a command value to be output to a motor driver such as the servo motor driver 3 or the pulse motor driver.

その他のシステムプログラム220は、図5に個別に示したプログラム以外の、PLC1の各種機能を実現するためのプログラム群をまとめて示したものである。その他のシステムプログラム220は、モーション制御サイクルの周期を設定するプログラム222を含む。   Other system programs 220 collectively represent a group of programs for realizing various functions of the PLC 1 other than the programs individually shown in FIG. The other system program 220 includes a program 222 for setting the period of the motion control cycle.

モーション制御サイクルの周期は、制御目的に応じて適宜設定することができる。典型的には、モーション制御サイクルの周期を指定する情報をユーザがPLCサポート装置8へ入力する。すると、その入力された情報は、PLCサポート装置8からCPUユニット
13へ転送される。モーション制御サイクルの周期を設定するプログラム222は、PLCサポート装置8からの情報を不揮発性メモリ106に格納させるとともに、システムタイマ108から指定されたモーション制御サイクルの周期で割り込み信号が発生されるように、システムタイマ108を設定する。CPUユニット13への電源投入時に、モーション制御サイクルの周期を設定するプログラム222が実行されることで、モーション制御サイクルの周期を指定する情報が不揮発性メモリ106から読み出され、読み出された情報に従ってシステムタイマ108が設定される。
The period of the motion control cycle can be appropriately set according to the control purpose. Typically, the user inputs information specifying the period of the motion control cycle to the PLC support device 8. Then, the input information is transferred from the PLC support device 8 to the CPU unit 13. The program 222 for setting the cycle of the motion control cycle stores information from the PLC support device 8 in the nonvolatile memory 106 and generates an interrupt signal at the cycle of the motion control cycle designated by the system timer 108. The system timer 108 is set. When the power to the CPU unit 13 is turned on, the program 222 for setting the cycle of the motion control cycle is executed, so that information specifying the cycle of the motion control cycle is read from the nonvolatile memory 106, and the read information Accordingly, the system timer 108 is set.

モーション制御サイクルの周期を指定する情報の形式としては、モーション制御サイクルの周期を示す時間の値や、モーション制御サイクルの周期に関する予め用意された複数の選択肢のうちから1つを特定する情報(番号または文字)などを採用することができる。   The format of the information for specifying the period of the motion control cycle includes a time value indicating the period of the motion control cycle and information for identifying one of a plurality of options prepared in advance relating to the period of the motion control cycle (number Or a character) etc. can be adopted.

本実施の形態に係るCPUユニット13において、モーション制御サイクルの周期を設定する手段としては、モーション制御サイクルの周期を指定する情報を取得するために用いられるPLCサポート装置8との通信手段、モーション制御サイクルの周期を設定するプログラム222、ならびにモーション制御サイクルを規定する割り込み信号の周期を任意に設定可能に構成されているシステムタイマ108の構成といった、モーション制御サイクルの周期を任意の設定するために用いられる要素が該当する。   In the CPU unit 13 according to the present embodiment, as means for setting the period of the motion control cycle, means for communicating with the PLC support device 8 used for acquiring information specifying the period of the motion control cycle, motion control Used to arbitrarily set the period of the motion control cycle, such as the program 222 for setting the cycle period and the configuration of the system timer 108 that can arbitrarily set the period of the interrupt signal that defines the motion control cycle. Applicable element.

リアルタイムOS200は、複数のプログラムを時間の経過に従い切り換えて実行するための環境を提供する。本実施の形態に係るPLC1においては、CPUユニット13のプログラム実行によって生成された出力データを他のユニットまたは他の装置へ出力(送信)するためのイベント(割り込み)として、出力準備割り込み(P)およびフィールドネットワーク送信割り込み(X)が初期設定される。リアルタイムOS200は、出力準備割り込み(P)またはフィールドネットワーク送信割り込み(X)が発生すると、マイクロプロセッサ100での実行対象を、割り込み発生時点で実行中のプログラムからスケジューラプログラム212に切り換える。なお、リアルタイムOS200は、スケジューラプログラム212およびスケジューラプログラム212がその実行を制御するプログラムが何ら実行されていない場合に、その他のシステムプログラム210に含まれているプログラムを実行する。このようなプログラムとしては、たとえば、CPUユニット13とPLCサポート装置8との間の接続ケーブル10(USB)などを介した通信処理に関するものが含まれる。   The real-time OS 200 provides an environment for switching and executing a plurality of programs over time. In the PLC 1 according to the present embodiment, an output preparation interrupt (P) is used as an event (interrupt) for outputting (transmitting) output data generated by program execution of the CPU unit 13 to another unit or another device. And the field network transmission interrupt (X) is initialized. When the output preparation interrupt (P) or the field network transmission interrupt (X) occurs, the real time OS 200 switches the execution target in the microprocessor 100 from the program being executed at the time of the interrupt generation to the scheduler program 212. Note that the real-time OS 200 executes the programs included in the other system programs 210 when the scheduler program 212 and the program that controls the execution of the scheduler program 212 are not executed at all. Such a program includes, for example, a program related to communication processing between the CPU unit 13 and the PLC support device 8 via the connection cable 10 (USB).

<D.構成例>
以下、上述したライブラリ280を備えるPLC1を適用したシステム構成(PLC1とスレーブ装置とからなるシステム構成)の例について説明する。
<D. Configuration example>
Hereinafter, an example of a system configuration (a system configuration including the PLC 1 and the slave device) to which the PLC 1 including the library 280 described above is applied will be described.

(d1.第1の適用例)
図6は、PLC1の第1の適用例を説明するための図である。図6(A)は、プロジェクト270の概要を説明するための図である。図6(B)は、機械Gの構成を表した図である。図6(C)は、他の機械Hの構成を表した図である。
(D1. First application example)
FIG. 6 is a diagram for explaining a first application example of the PLC 1. FIG. 6A is a diagram for explaining an outline of the project 270. FIG. 6B is a diagram illustrating the configuration of the machine G. FIG. 6C is a diagram illustrating the configuration of another machine H.

図6(B)を参照して、機械Gは、PLC1とスレーブ装置A,B,Cとで構成される。また、図6(C)を参照して、機械Hは、PLC1とスレーブ装置A,B,Dとで構成される。   Referring to FIG. 6 (B), machine G includes PLC 1 and slave devices A, B, and C. Referring to FIG. 6C, machine H includes PLC 1 and slave devices A, B, and D.

図6(A)を参照して、PLCサポート装置8のユーザは、PLCサポート装置8において、スレーブ装置A〜Dと特定するための識別情報と、各スレーブ装置のノード番号とを含むシステム構成情報を生成する。また、当該ユーザは、ユーザプログラム330において、スレーブ装置C,Dを無効にする設定を行なう。さらに、当該ユーザは、ユーザプログラム330において、スレーブ装置Cに割り付けられた軸を無効にする設定と、スレーブ装置Dに割り付けられた軸を無効にする設定を行なう。   Referring to FIG. 6A, the user of PLC support device 8 includes system configuration information including identification information for identifying slave devices A to D and the node number of each slave device in PLC support device 8. Is generated. In addition, the user performs setting for invalidating the slave devices C and D in the user program 330. Further, in the user program 330, the user performs a setting for invalidating the axis assigned to the slave device C and a setting for invalidating the axis assigned to the slave device D.

また、PLCサポート装置8のユーザは、ユーザプログラム330において、機械Gを指定する信号を受け取ると、スレーブ装置Cを有効にし、スレーブ装置Cに割り付ける軸を有効にするためのロジックを生成する。具体的には、当該ユーザは、ユーザプログラム330において、スレーブ装置Cを有効にするためのプログラム281と、スレーブ装置Cに割り付けられた軸を有効にするためのプログラム283とをこの順に実行するための記述を行なう。   Further, when the user of the PLC support device 8 receives a signal designating the machine G in the user program 330, the user activates the slave device C and generates logic for validating the axis assigned to the slave device C. Specifically, in the user program 330, the user executes the program 281 for enabling the slave device C and the program 283 for enabling the axis assigned to the slave device C in this order. Write a description.

さらに、ユーザは、ユーザプログラム330において、機械Hを指定する信号を受け取ると、スレーブ装置Dを有効にし、スレーブ装置Dに割り付ける軸を有効にするためのロジックを生成する。具体的には、当該ユーザは、ユーザプログラム330において、スレーブ装置Dを有効にするためのプログラム281と、スレーブ装置Dに割り付けられた軸を有効にするためのプログラム283とをこの順に実行するための記述を行なう。   Further, when the user receives a signal specifying the machine H in the user program 330, the user generates the logic for enabling the slave device D and for enabling the axis to be assigned to the slave device D. Specifically, in the user program 330, the user executes the program 281 for enabling the slave device D and the program 283 for enabling the axis assigned to the slave device D in this order. Write a description.

PLCサポート装置8においてユーザプログラム330はコンパイルされ、PLCサポート装置8は、コンパイルにより得られたユーザプログラム236をPLC1に送信する。   The user program 330 is compiled in the PLC support device 8, and the PLC support device 8 transmits the user program 236 obtained by the compilation to the PLC 1.

PLC1のユーザは、ディップスイッチの位置を位置P1とすることにより機械Gを指定する信号をPLC1に与えることで、スレーブ装置Dを無効とした機械Gを構成することができる。また、PLC1のユーザは、ディップスイッチの位置を位置P2とすることにより機械Hを指定する信号をPLC1に与えることで、スレーブ装置Dを無効とした機械Gを構成することができる。   The user of the PLC 1 can configure the machine G in which the slave device D is invalidated by giving the PLC 1 a signal specifying the machine G by setting the position of the dip switch to the position P1. Moreover, the user of PLC1 can comprise the machine G which invalidated the slave apparatus D by giving the signal which designates the machine H to PLC1 by setting the position of a dip switch to the position P2.

また、有効な状態としたスレーブ装置Cとスレーブ装置Cに割り付けられた軸とを再度無効とするために、PLCサポート装置8のユーザは、ユーザプログラム330において、機械Hを指定する信号を受け取ると、スレーブ装置Cを無効にし、スレーブ装置Cに割り付ける軸を無効にするためのロジックを生成しておく。具体的には、当該ユーザは、ユーザプログラム330において、スレーブ装置Cに割り付けられた軸を無効にするためのプログラム284とスレーブ装置Cを無効にするためのプログラム282とをこの順に実行するための記述を行なう。   In addition, when the user of the PLC support device 8 receives a signal designating the machine H in the user program 330 in order to invalidate again the slave device C and the axis assigned to the slave device C in the valid state. The logic for invalidating the slave device C and invalidating the axis assigned to the slave device C is generated. Specifically, in the user program 330, the user executes a program 284 for invalidating the axis assigned to the slave device C and a program 282 for invalidating the slave device C in this order. Make a description.

さらに、有効な状態としたスレーブ装置Dとスレーブ装置Dに割り付けられた軸とを再度無効とするために、PLCサポート装置8のユーザは、ユーザプログラム330において、機械Gを指定する信号を受け取ると、スレーブ装置Dを無効にし、スレーブ装置Dに割り付ける軸を無効にするためのロジックを生成しておく。具体的には、当該ユーザは、ユーザプログラム330において、スレーブ装置Dに割り付けられた軸を無効にするためのプログラム284とスレーブ装置Dを無効にするためのプログラム282とをこの順に実行するための記述を行なう。   Furthermore, when the user of the PLC support device 8 receives a signal designating the machine G in the user program 330 in order to invalidate again the slave device D in the valid state and the axis assigned to the slave device D. The logic for invalidating the slave device D and invalidating the axis assigned to the slave device D is generated. Specifically, in the user program 330, the user executes a program 284 for invalidating the axis assigned to the slave device D and a program 282 for invalidating the slave device D in this order. Make a description.

以上により、1つのプロジェクト270によって、異なる装置構成を有する機械G,Hを管理できることになる。つまり、スレーブ装置A,B,Cを有するがスレーブ装置Dを有しない機械Gと、スレーブ装置A,B,Dを有するがスレーブ装置Cを有しない機械Hとを1つのプロジェクト270によって管理することができる。   As described above, the machines G and H having different device configurations can be managed by one project 270. That is, a single project 270 manages a machine G having slave devices A, B, and C but not having a slave device D and a machine H having slave devices A, B, and D but not having a slave device C. Can do.

また、PLCサポートプログラム320(図20)、またはPLCサポート装置8を利用する権限もしくは操作能力を有していなくても、1つのプロジェクト270で、複数の機械間の切り替えを行なうことができる。   Further, even if the user does not have the authority or operation capability to use the PLC support program 320 (FIG. 20) or the PLC support device 8, switching between a plurality of machines can be performed in one project 270.

なお、上記においては、ディップスイッチの位置によって、機械Gと機械Hとを切り替えたが、PLC1の表示器(図示せず)の画面に、機械Gおよび機械Hのいずれかを選択するための画像を表示し、PLC1のユーザに当該画像のいずれかを選択させる構成としてもよい。   In the above description, the machine G and the machine H are switched depending on the position of the dip switch. However, an image for selecting either the machine G or the machine H on the screen of the display (not shown) of the PLC 1. May be displayed and the user of the PLC 1 may select one of the images.

(d2.第2の適用例)
図7は、PLC1の第2の適用例を説明するための図である。図7(A)は、プロジェクト270の概要を説明するための図である。図7(B)は、ラインY1を他のラインY2に置き換える前の機械の構成を表した図である。図7(C)は、ラインY1を他のラインY2に置き換えた後の機械の構成を表した図である。
(D2. Second application example)
FIG. 7 is a diagram for explaining a second application example of the PLC 1. FIG. 7A is a diagram for explaining an outline of the project 270. FIG. 7B is a diagram illustrating the configuration of the machine before the line Y1 is replaced with another line Y2. FIG. 7C is a diagram illustrating the configuration of the machine after the line Y1 is replaced with another line Y2.

図7(B)を参照して、機械Pは、PLC1とラインXとラインY1とで構成される。ラインXは、スレーブ装置A,B,Cをこの順に含む。ラインY1は、スレーブ装置J,K,Lをこの順に含む。図7(C)を参照して、機械Qは、PLC1とラインXとラインY2とで構成される。ラインY2は、スレーブ装置S,Tをこの順に含む。   With reference to FIG. 7 (B), the machine P is comprised by PLC1, the line X, and the line Y1. Line X includes slave devices A, B, and C in this order. Line Y1 includes slave devices J, K, and L in this order. Referring to FIG. 7C, the machine Q is composed of PLC1, line X, and line Y2. Line Y2 includes slave devices S and T in this order.

図7(A)を参照して、PLCサポート装置8のユーザは、PLCサポート装置8において、スレーブ装置A〜C,J〜L,S,Tと特定するための識別情報と、各スレーブ装置のノード番号とを含むシステム構成情報を生成する。また、当該ユーザは、ユーザプログラム330において、スレーブ装置J,K,L,S,Tを無効にする設定を行なう。さらに、当該ユーザは、ユーザプログラム330において、スレーブ装置J,K,L,S,Tの各々に割り付けられた軸を無効にする設定を行なう。   Referring to FIG. 7A, the user of PLC support device 8 identifies identification information for identifying slave devices A to C, J to L, S, and T in PLC support device 8, and each slave device. System configuration information including a node number is generated. In addition, the user performs setting for invalidating the slave devices J, K, L, S, and T in the user program 330. Further, the user makes a setting in the user program 330 to invalidate the axis assigned to each of the slave devices J, K, L, S, and T.

また、PLCサポート装置8のユーザは、ユーザプログラム330において、ラインY1の起動を指示する信号を受け取ると、スレーブ装置J,K,Lを有効にし、次いでスレーブ装置J,K,Lに割り付ける軸を有効にするためのロジックを生成する。さらに、ユーザは、ユーザプログラム330において、ラインY2の起動を指示する信号を受け取ると、スレーブ装置S,Tを有効にし、次いでスレーブ装置S,Tに割り付ける軸を有効にするためのロジックを生成する。   When the user of the PLC support device 8 receives a signal instructing the activation of the line Y1 in the user program 330, the user activates the slave devices J, K, and L, and then selects the axis to be assigned to the slave devices J, K, and L. Generate logic to enable. Furthermore, when the user receives a signal instructing activation of the line Y2 in the user program 330, the user generates the logic for enabling the slave devices S and T and then enabling the axis assigned to the slave devices S and T. .

また、PLCサポート装置8のユーザは、ユーザプログラム330において、ラインY1の停止を指示する信号を受け取ると、スレーブ装置J,K,Lに割り付ける軸を無効にし、次いでスレーブ装置J,K,Lを無効にするためのロジックを生成する。さらに、ユーザは、ユーザプログラム330において、ラインY2の停止を指示する信号を受け取ると、スレーブ装置S,Tに割り付ける軸を無効にし、次いでスレーブ装置S,Tを無効にするためのロジックを生成する。   Further, when the user of the PLC support device 8 receives a signal instructing to stop the line Y1 in the user program 330, the axis assigned to the slave devices J, K, and L is invalidated, and then the slave devices J, K, and L are changed. Generate logic to disable. Further, when the user receives a signal instructing to stop the line Y2 in the user program 330, the user invalidates the axis assigned to the slave devices S and T, and then generates logic for invalidating the slave devices S and T. .

PLCサポート装置8においてユーザプログラム330はコンパイルされ、PLCサポート装置8は、コンパイルにより得られたユーザプログラム236をPLC1に送信する。   The user program 330 is compiled in the PLC support device 8, and the PLC support device 8 transmits the user program 236 obtained by the compilation to the PLC 1.

PLC1のユーザは、たとえばディップスイッチの位置を位置P1とすることによりラインY1の起動を指示する信号をPLC1に与えることで、スレーブ装置J,K,Lが有効になり、次いでスレーブ装置J,K,Lに割り付ける軸を有効になる。つまり、当該ユーザは、ラインY1をスレーブ装置J,K,Lを含むラインとして動作させることができる。   The user of the PLC 1 gives the PLC 1 a signal for instructing the activation of the line Y 1 by setting the position of the dip switch to the position P 1, for example, so that the slave devices J, K, L become effective, and then the slave devices J, K , The axis assigned to L becomes valid. That is, the user can operate the line Y1 as a line including the slave devices J, K, and L.

ラインY1をラインY2に置き換える場合、PLC1のユーザが、まず、ラインY1の起動を停止する信号をPLC1に与えることで、スレーブ装置J,K,Lに割り付ける軸を無効にし、次いでスレーブ装置J,K,Lを無効にする。次いで、当該ユーザは、ラインY1を構成するスレーブ装置J,K,Lを物理的に取り外す。次いで、当該ユーザは、ラインY2を構成するスレーブ装置S,Tを物理的に取り付ける。   When replacing the line Y1 with the line Y2, the user of the PLC1 first invalidates the axis assigned to the slave devices J, K, and L by giving the PLC1 a signal for stopping the activation of the line Y1, and then the slave devices J, Disable K and L. Next, the user physically removes the slave devices J, K, and L constituting the line Y1. Next, the user physically attaches the slave devices S and T constituting the line Y2.

最後に、PLC1のユーザが、たとえばディップスイッチの位置を位置P2とすることによりラインY2の起動を指示する信号をPLC1に与えることで、スレーブ装置S,Tが有効になり、次いでスレーブ装置S,Tに割り付ける軸を有効になる。つまり、当該ユーザは、ラインY1をスレーブ装置J,K,Lを含むラインとして動作させることができる。   Finally, the user of the PLC 1 gives the PLC 1 a signal for instructing the activation of the line Y 2 by setting the position of the dip switch to the position P 2, for example, so that the slave devices S and T become effective, and then the slave devices S, The axis assigned to T is enabled. That is, the user can operate the line Y1 as a line including the slave devices J, K, and L.

以上により、1つのプロジェクト270によって、異なるラインを有する機械を管理できることになる。つまり、ラインY1(スレーブ装置J,K,L)を有するがラインY2(スレーブ装置S,T)を有しない機械と、ラインY2を有するがラインY1を有しない機械とを、1つのプロジェクトで管理することができる。   As described above, machines having different lines can be managed by one project 270. That is, a single project manages a machine having line Y1 (slave devices J, K, L) but not having line Y2 (slave devices S, T) and a machine having line Y2 but not line Y1. can do.

また、機械Pの物理的構成を機械Qの物理的構成へと変更する場合には、ラインXを停止させる必要がない。このため、ラインXを停止せざるを得ない構成に比べて、生産効率の低下を防ぐことができる。つまり、複数のラインの一部のラインを新たな他のラインに切り替える場合において、生産効率の低下を必要最小限に抑えることができる。   Further, when the physical configuration of the machine P is changed to the physical configuration of the machine Q, it is not necessary to stop the line X. For this reason, compared with the structure which must stop the line X, the fall of production efficiency can be prevented. That is, when a part of a plurality of lines is switched to another new line, a decrease in production efficiency can be minimized.

さらに、PLCサポートプログラム320(図20)、またはPLCサポート装置8を利用する権限もしくは操作能力を有していなくても、1つのプロジェクト270で、複数の機械間の切り替えを行なうことができる。   Further, even if the user does not have the authority or operation capability to use the PLC support program 320 (FIG. 20) or the PLC support device 8, switching between a plurality of machines can be performed in one project 270.

なお、上記においては、ディップスイッチではなく、PLC1の表示器からラインの起動および停止を指示するユーザ操作を受け付ける構成としてもよい。   Note that, in the above description, a configuration may be adopted in which a user operation instructing start and stop of a line is received from the display of the PLC 1 instead of the DIP switch.

<E.PLC1の具体的動作>
図8は、PLC1に記憶されるデータを説明するための図である。図8(A)は、システム構成情報240の概要を説明するための図である。図8(B)は、変数テーブル250を説明するための図である。
<E. Specific operation of PLC1>
FIG. 8 is a diagram for explaining data stored in the PLC 1. FIG. 8A is a diagram for explaining an overview of the system configuration information 240. FIG. 8B is a diagram for explaining the variable table 250.

図8(A)を参照して、システム構成情報240は、少なくとも、スレーブ装置のノード番号と、スレーブ装置の識別情報と、スレーブ装置の状態情報とを含む。スレーブ装置の状態としては、初期化状態と、プレオペレーショナル状態と、セーフオペレーショナル状態と、オペレーショナル状態との4つの状態がある。スレーブ装置の状態情報には、当該4つの状態のうち、現在の状態が記される。   Referring to FIG. 8A, system configuration information 240 includes at least a node number of the slave device, identification information of the slave device, and status information of the slave device. There are four slave device states: an initialization state, a pre-operational state, a safe operational state, and an operational state. Of the four states, the current state is written in the state information of the slave device.

PLC1は、システム構成情報240におけるスレーブ装置の状態情報を変更する処理を行なうことによって、スレーブ装置の状態を変更する。また、PLC1が、スレーブ装置に対して有効になるよう命令を行なう場合には、スレーブ装置から有効になった旨の通知(移行完了通知)を受け取った後に、スレーブ装置の状態情報を「プレオペレーショナル状態」から「オペレーショナル状態」に書き換える。   The PLC 1 changes the state of the slave device by performing processing for changing the state information of the slave device in the system configuration information 240. In addition, when the PLC 1 instructs the slave device to become effective, after receiving a notification that the slave device has been enabled (transition completion notification), the status information of the slave device is set to “pre-operational”. Rewrite from "state" to "operational state".

PLC1は、システム構成情報240におけるスレーブ装置の状態情報に応じた処理を行なう。たとえば、スレーブ装置Dの状態情報がプレオペレーショナル状態である場合には、後述するプロセスデータにおけるスレーブ装置DのINデータを無視する。   The PLC 1 performs processing according to the status information of the slave device in the system configuration information 240. For example, when the status information of the slave device D is a pre-operational state, IN data of the slave device D in process data to be described later is ignored.

システム構成情報240は、不揮発性のメモリに格納されるため、PLC1への電源供給が停止した場合であっても、PLC1は、電源供給が停止する直前のスレーブ装置の状態情報(有効または無効)を失うことはない。   Since the system configuration information 240 is stored in a non-volatile memory, even when the power supply to the PLC 1 is stopped, the PLC 1 is in the state information (valid or invalid) of the slave device immediately before the power supply is stopped. Never lose.

図8(B)を参照して、変数テーブル250は、軸を表す変数名と、状態情報とを含む。状態情報には、変数で特定される軸が有効か無効かを示す情報が格納される。   Referring to FIG. 8B, variable table 250 includes variable names representing axes and state information. The state information stores information indicating whether the axis specified by the variable is valid or invalid.

また、PLC1は、図8(A)におけるスレーブ装置のノード番号と、図8(B)における変数とを対応付けたデータを有している。たとえば、ノード番号2のスレーブ装置(たとえば、サーボモータドライバ3)が、第1のグループのY軸(図8(B)における「Group1−Y」)であることが対応付けられている。   Further, the PLC 1 has data in which the node number of the slave device in FIG. 8A is associated with the variable in FIG. For example, the slave device having the node number 2 (for example, the servo motor driver 3) is associated with the Y axis of the first group (“Group 1-Y” in FIG. 8B).

PLC1は、変数テーブル250における状態情報を変更する処理を行なうことによって、軸の状態を変更する。また、PLC1が、軸が有効になるよう命令を行なう場合には、スレーブ装置が有効であることを確認した後に、軸の状態情報を「無効」から「有効」に書き換える。   The PLC 1 changes the state of the axis by performing processing for changing the state information in the variable table 250. Further, when the PLC 1 issues an instruction to enable the axis, after confirming that the slave device is valid, the state information of the axis is rewritten from “invalid” to “valid”.

なお、変数テーブル250も、システム構成情報240と同様に、不揮発性のメモリに格納されるため、PLC1への電源供給が停止した場合であっても、PLC1は、電源供給が停止する直前の軸の状態情報(有効または無効)を失うことはない。   Note that the variable table 250 is also stored in the nonvolatile memory in the same manner as the system configuration information 240, so even if the power supply to the PLC 1 is stopped, the PLC 1 is the axis immediately before the power supply is stopped. Never lose state information (valid or invalid).

図9は、スレーブ装置の状態情報を説明するための図である。図9を参照して、スレーブ装置は、電源が投入されると、自己診断の後、初期化状態に遷移する。次いで、スレーブ装置は、プレオペレーショナル状態に遷移する。その後、スレーブ装置は、セーフオペレーショナル状態に遷移する。さらにその後、スレーブ装置は、オペレーショナル状態に遷移する。   FIG. 9 is a diagram for explaining state information of the slave device. Referring to FIG. 9, when power is turned on, the slave device transitions to an initialization state after self-diagnosis. Next, the slave device transitions to the pre-operational state. Thereafter, the slave device transitions to the safe operational state. Thereafter, the slave device transitions to the operational state.

初期化状態では、スレーブ装置は、マスタ装置であるPLC1との間で、プロセスデータ通信およびSDO(Service Data Objects)通信を行なうことができない。「プロセスデータ通信」とは、定周期でリアルタイムの情報交換を行なうプロセスデータオブジェクトを使用した通信である。「SDO」とは、任意のタイミングで情報伝達を行なうサービスデータオブジェクトを使用した通信である。   In the initialized state, the slave device cannot perform process data communication and SDO (Service Data Objects) communication with the PLC 1 that is the master device. “Process data communication” refers to communication using process data objects that exchange information in real time at regular intervals. “SDO” is communication using a service data object that transmits information at an arbitrary timing.

プレオペレーショナル状態では、スレーブ装置は、PLC1との間で、SDO通信を行えるが、プロセスデータ通信を行なえない。セーフオペレーショナル状態では、スレーブ装置は、PLC1との間で、プロセスデータ通信の入力および出力のうちの入力と、SDO通信とを行なえる。オペレーショナル状態は、定常状態である。オペレーショナル状態では、スレーブ装置は、PLC1との間で、プロセスデータ通信の入出力と、SDO通信とを行なえる。   In the pre-operational state, the slave device can perform SDO communication with the PLC 1, but cannot perform process data communication. In the safe operational state, the slave device can perform input of process data communication and input of the PLC 1 and SDO communication with the PLC 1. The operational state is a steady state. In the operational state, the slave device can perform process data communication input / output and SDO communication with the PLC 1.

また、スレーブ装置は、たとえば、オペレーショナル状態からプレオペレーショナル状態に遷移することもできる。この場合、スレーブ装置は、再度、オペレーショナル状態に遷移する為には、セーフオペレーショナル状態を経ることになる。   The slave device can also transition from the operational state to the pre-operational state, for example. In this case, the slave device goes through the safe operational state in order to transition to the operational state again.

図10は、スレーブ装置が無効となったときのスレーブ装置の仕様およびプロセスデータの仕様等を説明するための図である。図10を参照して、スレーブ装置が無効な状態とは、スレーブ装置の状態が「プレオペレーショナル状態」である場合をいう。スレーブ装置の状態がプレオペレーショナル状態である場合には、スレーブ装置は、上述したように、PLC1との間でプロセスデータ通信を行なえない。この場合、スレーブ装置は、プロセスデータのINデータ(スレーブ装置が書き込むデータ)を更新しない。つまり、スレーブ装置は、プロセスデータのINデータとして、有効な状態の値を書き込む。プロセスデータのOUTデータ(PLC1が書き込むデータ)は、ユーザプログラム236に従う。また、スレーブ装置からの実際の出力(フィールドネットワーク2には直接的には接続されていない、スレーブ装置に接続されたセンサ等の装置への出力)は、スレーブ装置の設定に従った値となる。   FIG. 10 is a diagram for explaining the specification of the slave device and the specification of the process data when the slave device becomes invalid. Referring to FIG. 10, the state where the slave device is invalid refers to a case where the state of the slave device is a “pre-operational state”. When the slave device is in the pre-operational state, the slave device cannot perform process data communication with the PLC 1 as described above. In this case, the slave device does not update the IN data of the process data (data written by the slave device). That is, the slave device writes a valid value as IN data of the process data. Process data OUT data (data written by the PLC 1) follows the user program 236. The actual output from the slave device (output to a device such as a sensor connected to the slave device that is not directly connected to the field network 2) is a value according to the setting of the slave device. .

また、スレーブ装置が有効な状態とは、スレーブ装置の状態が「オペレーショナル状態」であることを意味する。   Further, the state in which the slave device is valid means that the state of the slave device is the “operational state”.

図11は、プロセスデータを説明するための図である。図11(A)は、プロセスデータの流れを説明するための図である。図11(B)は、プロセスデータの構造を説明するための図である。図11(A)を参照して、PLC1は、プロセスデータD11を出力する。プロセスデータD11は、フィールドネットワーク2(EtherCAT)によって、スレーブ装置A、スレーブ装置B、スレーブ装置C、スレーブ装置Dをこの順番に通過する。なお、図11(A)のプロセスデータD11におけるA,B,C,Dの記号は、それぞれ、スレーブ装置Aに関するデータ、スレーブ装置Bに関するデータ、スレーブ装置Cに関するデータ、スレーブ装置Dに関するデータを表している。   FIG. 11 is a diagram for explaining the process data. FIG. 11A is a diagram for explaining the flow of process data. FIG. 11B is a diagram for explaining the structure of process data. Referring to FIG. 11A, PLC 1 outputs process data D11. The process data D11 passes through the slave device A, the slave device B, the slave device C, and the slave device D in this order by the field network 2 (EtherCAT). Note that the symbols A, B, C, and D in the process data D11 in FIG. 11A represent data related to the slave device A, data related to the slave device B, data related to the slave device C, and data related to the slave device D, respectively. ing.

図11(B)を参照して、プロセスデータD11は、スレーブ装置AのOUTデータが格納される領域と、スレーブ装置BのOUTデータが格納される領域と、スレーブ装置CのOUTデータが格納される領域と、スレーブ装置DのOUTデータが格納される領域とを含む。さらに、プロセスデータD11は、スレーブ装置AのINデータが格納される領域と、スレーブ装置BのINデータが格納される領域と、スレーブ装置CのINデータが格納される領域と、スレーブ装置DのINデータが格納される領域とを含む。   Referring to FIG. 11B, process data D11 stores an area where OUT data of slave apparatus A is stored, an area where OUT data of slave apparatus B is stored, and OUT data of slave apparatus C. And an area in which the OUT data of the slave device D is stored. Further, the process data D11 includes an area for storing the IN data of the slave device A, an area for storing the IN data of the slave device B, an area for storing the IN data of the slave device C, and the data of the slave device D. And an area for storing IN data.

スレーブ装置AのOUTデータが格納される領域には、スレーブ装置Aが取得する(読み出す)データがPLC1によって書き込まれる。また、同様に、スレーブ装置B,C,DのOUTデータが格納される領域には、それぞれ、スレーブ装置B,C,Dが取得するデータが書き込まれる。   Data acquired (read) by the slave device A is written by the PLC 1 in an area where the OUT data of the slave device A is stored. Similarly, data acquired by the slave devices B, C, and D is written in areas where the OUT data of the slave devices B, C, and D are stored, respectively.

また、スレーブ装置AのINデータが格納される領域は、スレーブ装置Aがセンサ等の装置から取り込んだデータが書き込まれる。また、同様に、スレーブ装置B,C,DのINデータが格納される領域には、それぞれ、スレーブ装置B,C,Dがセンサ等の装置から取り込んだデータが書き込まれる。   Further, in the area where the IN data of the slave device A is stored, the data taken by the slave device A from a device such as a sensor is written. Similarly, in the areas where the IN data of the slave devices B, C, and D are stored, the data that the slave devices B, C, and D have taken from devices such as sensors are written.

図12は、スレーブ装置Cが有効であり、かつスレーブ装置Dが無効である場合における、スレーブ装置Cとスレーブ装置Dとのプロセスデータに対する処理を説明するための図である。図12を参照して、スレーブ装置Cは、プロセスデータD11におけるスレーブ装置CのOUTデータが格納される領域に格納されたデータを読み出す。また、スレーブ装置Cは、当該読み出したデータに基づき、スレーブ装置Aに接続されたセンサ等の装置に対して出力を行なう。さらに、スレーブ装置Cは、当該センサ等の装置からのデータを取り込む。また、スレーブ装置Cは、当該取り込んだデータを、スレーブ装置CのINデータが格納される領域に書き込む。   FIG. 12 is a diagram for explaining processing for process data of the slave device C and the slave device D when the slave device C is valid and the slave device D is invalid. Referring to FIG. 12, slave device C reads data stored in an area where OUT data of slave device C is stored in process data D11. Further, the slave device C outputs to a device such as a sensor connected to the slave device A based on the read data. Furthermore, the slave device C takes in data from a device such as the sensor. Further, the slave device C writes the fetched data in an area where the IN data of the slave device C is stored.

スレーブ装置Dは、無効の状態(プレオペレーショナル状態)であるため、プロセスデータD11におけるスレーブ装置DのOUTデータが格納される領域に格納されたデータを読み出さない。また、スレーブ装置Dは、スレーブ装置Dの設定に従った値を出力する。さらに、スレーブ装置Dは、取り込んだデータを用いたプロセスデータのINデータの更新を行なわない。つまり、スレーブ装置は、プロセスデータのINデータとして、有効な状態の値を書き込む。   Since the slave device D is in an invalid state (pre-operational state), the data stored in the area in which the OUT data of the slave device D in the process data D11 is stored is not read. Further, the slave device D outputs a value according to the setting of the slave device D. Further, the slave device D does not update the IN data of the process data using the fetched data. That is, the slave device writes a valid value as IN data of the process data.

図13は、PLC1とスレーブ装置との処理を説明するためのシーケンス図である。具体的には、図13は、無効なスレーブ装置を有効にするための処理を説明するための図である。   FIG. 13 is a sequence diagram for explaining processing between the PLC 1 and the slave device. Specifically, FIG. 13 is a diagram for explaining processing for validating an invalid slave device.

図13を参照して、シーケンスSQ2において、スレーブ装置は、初期化状態またはプレオペレーショナル状態で動作する。シーケンスSQ4において、PLC1は、スレーブ装置を有効にする有効FB(図3参照)に規定される処理を実行する命令を受け付ける。シーケンスSQ6において、PLC1は、有効にする対象となるスレーブ装置に対して、オペレーショナル状態への移行を指示する。シーケンスSQ8において、PLC1は、スレーブ装置の監視を行なう。シーケンスSQ10において、スレーブ装置は、オペレーショナル状態に移行(遷移)する。シーケンスSQ12において、スレーブ装置は、移行完了通知をPLC1に送信する。シーケンスSQ14において、PLC1は、上記有効FBに規定された処理を終了する。   Referring to FIG. 13, in sequence SQ2, the slave device operates in the initialization state or the pre-operational state. In sequence SQ4, the PLC 1 accepts an instruction to execute a process defined by a valid FB (see FIG. 3) that enables the slave device. In sequence SQ6, the PLC 1 instructs the slave device to be activated to shift to the operational state. In sequence SQ8, PLC1 monitors the slave device. In sequence SQ10, the slave device shifts (transitions) to the operational state. In sequence SQ12, the slave device transmits a migration completion notification to PLC1. In sequence SQ14, the PLC 1 ends the process defined in the effective FB.

図14は、PLC1とスレーブ装置との他の処理の説明するためのシーケンス図である。具体的には、図14は、有効なスレーブ装置を無効にするための処理を説明するための図である。   FIG. 14 is a sequence diagram for explaining another process between the PLC 1 and the slave device. Specifically, FIG. 14 is a diagram for explaining processing for invalidating a valid slave device.

図14を参照して、シーケンスSQ102において、スレーブ装置は、オペレーショナル状態で動作する。シーケンスSQ104において、PLC1は、スレーブ装置を無効にする無効FBに規定される処理を実行する命令を受け付ける。シーケンスSQ106において、PLC1は、無効にする対象となるスレーブ装置に対して、プレオペレーショナル状態への移行を指示する。シーケンスSQ108において、PLC1は、スレーブ装置の監視を行なう。シーケンスSQ110において、スレーブ装置は、プレオペレーショナル状態に移行(遷移)する。シーケンスSQ112において、スレーブ装置は、移行完了通知をPLC1に送信する。シーケンスSQ114において、PLC1は、上記無効FBに規定された処理を終了する。   Referring to FIG. 14, in sequence SQ102, the slave device operates in the operational state. In sequence SQ104, the PLC 1 accepts an instruction to execute a process defined by the invalid FB for invalidating the slave device. In sequence SQ106, the PLC 1 instructs the slave device to be invalidated to shift to the pre-operational state. In sequence SQ108, PLC1 monitors the slave device. In sequence SQ110, the slave device shifts (transitions) to the pre-operational state. In sequence SQ112, the slave device transmits a migration completion notification to PLC1. In sequence SQ114, the PLC1 ends the process defined in the invalid FB.

<F.軸の有効化および無効化>
図15は、軸制御を行なう場合のソース形式のユーザプログラム330の一部を表した図である。図15(A)は、軸が割り付けられたスレーブ装置をフィールドネットワーク2から取り外すときの処理を記述した命令(FB)を説明するための図である。図15(B)は、軸が割り付けたスレーブ装置をフィールドネットワーク2に取り付けるときの処理を記述した命令(FB)を説明するための図である。
<F. Enabling and disabling axes>
FIG. 15 is a diagram showing a part of a user program 330 in a source format when axis control is performed. FIG. 15A is a diagram for explaining an instruction (FB) describing a process for removing a slave device to which an axis is assigned from the field network 2. FIG. 15B is a diagram for explaining a command (FB) describing a process when a slave device assigned with an axis is attached to the field network 2.

図15(A)を参照して、ユーザプログラム330は、軸を無効にするためのFB295と、スレーブ装置を無効にするためのFB296とを、この順に含む。PLC1は、当該ユーザプログラム330をコンパイルしたユーザプログラム236を実行することにより、スレーブ装置に割り付けられた軸を有効な状態から無効な状態へ変更するための処理を実行した後に、スレーブ装置を有効な状態から無効な状態へ変更するための処理を実行する。このような順序で処理を実行させる理由(つまり、このような順序での処理を実行させるユーザプログラムを作成する必要がある理由)は、軸が動作中に、スレーブ装置を先に無効にしてしまうと、後述する対応策を取っておかなければ軸を安全に停止することができないおそれがあるためである。   Referring to FIG. 15A, user program 330 includes FB 295 for invalidating the axis and FB 296 for invalidating the slave device in this order. The PLC 1 executes the user program 236 obtained by compiling the user program 330 to execute the process for changing the axis assigned to the slave device from the valid state to the invalid state, and then activates the slave device. Execute the process to change from the state to the invalid state. The reason for executing the processes in such an order (that is, the reason for creating a user program for executing the processes in such an order) is that the slave device is first invalidated while the axis is operating. This is because there is a possibility that the shaft cannot be safely stopped unless a countermeasure described later is taken.

図15(B)を参照して、ユーザプログラム330は、スレーブ装置を有効にするためのFB297と、軸を有効にするためのFB298とを、この順に含む。PLC1は、当該ユーザプログラム330をコンパイルしたユーザプログラム236を実行することにより、スレーブ装置を無効な状態から有効な状態へ変更するための処理を実行した後に、スレーブ装置に割り付けられた軸を無効な状態から有効な状態へ変更するための処理を実行する。   Referring to FIG. 15B, user program 330 includes FB297 for enabling the slave device and FB298 for enabling the axis in this order. The PLC 1 executes the process for changing the slave device from the invalid state to the valid state by executing the user program 236 obtained by compiling the user program 330, and then invalidates the axis assigned to the slave device. A process for changing from the state to the valid state is executed.

図16は、PLC1の処理の一例を説明するためのフローチャートである。具体的には、図16は、無効な軸を有効にするための命令を含むユーザプログラムに基づいたPLC1の処理の一例を説明するためのフローチャートである。   FIG. 16 is a flowchart for explaining an example of processing of the PLC 1. Specifically, FIG. 16 is a flowchart for explaining an example of processing of the PLC 1 based on a user program including a command for validating an invalid axis.

図16を参照して、ステップS2において、PLC1は、たとえばスレーブ装置をフィールドネットワーク2に取り付けるトリガの入力に基づき、軸を有効にする有効FB(たとえば図15(B)におけるFB298)に規定された処理を実行する命令を受け付ける。ステップS4において、PLC1は、軸を有効にするFBにおいて指定された軸を有効な状態にする。具体的には、PLC1は、軸を有効にするFBに対応付けられたプログラム283をライブラリから読み出し、当該読み出したプログラム283を実行する。なお、プログラム283は、上述したように、スレーブ装置に割り付けられた軸を有効にするための機能を実現するためのプログラムである。   Referring to FIG. 16, in step S <b> 2, PLC <b> 1 is defined as an effective FB (for example, FB 298 in FIG. 15B) that enables the axis based on, for example, an input of a trigger that attaches a slave device to field network 2. Accepts an instruction to execute processing. In step S4, the PLC 1 enables the axis specified in the FB for enabling the axis. Specifically, the PLC 1 reads the program 283 associated with the FB that enables the axis from the library, and executes the read program 283. Note that, as described above, the program 283 is a program for realizing a function for enabling the axis assigned to the slave device.

ステップS6において、PLC1は、モーション命令で指定された軸が有効か否かを判断する。PLC1は、指定された軸が有効であると判断された場合(ステップS6においてYES)、ステップS10において、軸が割り付けられたスレーブ装置に対して、モーション命令に従った動作命令を行なう。PLC1は、指定された軸が無効であると判断された場合(ステップS6においてNO)、ステップS8において、指定された軸が割り付けられたスレーブ装置に対して、当該モーション命令を送信しない。   In step S6, the PLC 1 determines whether or not the axis specified by the motion command is valid. If it is determined that the designated axis is valid (YES in step S6), the PLC 1 issues an operation command according to the motion command to the slave device to which the axis is assigned in step S10. When it is determined that the designated axis is invalid (NO in step S6), the PLC 1 does not transmit the motion command to the slave device to which the designated axis is assigned in step S8.

図17は、PLC1の処理の他の例を説明するためのフローチャートである。具体的には、図17は、有効な軸を無効にするための命令を含むユーザプログラムに基づいたPLC1の処理の一例を説明するためのフローチャートである。   FIG. 17 is a flowchart for explaining another example of the processing of the PLC 1. Specifically, FIG. 17 is a flowchart for explaining an example of processing of the PLC 1 based on a user program including a command for invalidating a valid axis.

図17を参照して、ステップS102において、PLC1は、たとえばスレーブ装置をフィールドネットワーク2から取り外すトリガの入力に基づき、軸を無効にする無効FBたとえば図15(A)におけるFB295)に規定された処理を実行する命令を受け付ける。ステップS104において、PLC1は、軸を無効にする無効FBにおいて指定された軸が動作中か否かを判断する。   Referring to FIG. 17, in step S102, PLC 1 performs processing defined in an invalid FB for invalidating an axis, for example, FB 295 in FIG. 15 (A), based on an input of a trigger for removing a slave device from field network 2, for example. The command to execute is accepted. In step S104, the PLC 1 determines whether or not the axis designated in the invalid FB for invalidating the axis is operating.

PLC1は、動作中であると判断した場合(ステップS104においてYES)、ステップS108において、エラー処理として、スレーブ装置に対して軸を停止させる命令(減速命令)を送信する。PLC1は、停止中であると判断した場合(ステップS104においてNO)およびステップS108の処理によって軸が停止したときは、ステップS106において、指定された軸を有効な状態から無効な状態へ移行させる。   If the PLC 1 determines that it is operating (YES in step S104), in step S108, it transmits a command (deceleration command) to stop the axis to the slave device as an error process. When the PLC 1 determines that it is stopped (NO in step S104) and when the axis is stopped by the process of step S108, the designated axis is shifted from the valid state to the invalid state in step S106.

<G.機能的構成>
図18は、PLC1の機能的構成を説明するための機能ブロック図である。図18を参照して、PLC1は、記憶部1010と、制御プログラム実行部1020と、通信部1030と、変更部1040とを備えている。
<G. Functional configuration>
FIG. 18 is a functional block diagram for explaining the functional configuration of the PLC 1. Referring to FIG. 18, PLC 1 includes storage unit 1010, control program execution unit 1020, communication unit 1030, and change unit 1040.

記憶部1010は、PLCサポート装置8において作成されたプロジェクト270と、ライブラリ280とが記憶されている。プロジェクト270は、ユーザプログラム236とシステム構成情報240とを含む。   The storage unit 1010 stores a project 270 created in the PLC support device 8 and a library 280. The project 270 includes a user program 236 and system configuration information 240.

(1)通信部1030は、スレーブ側のシステムを構成する複数のスレーブ装置の各々と、フィールドネットワーク2を介して通信する。制御プログラム実行部1020は、ユーザプログラム236を含む制御プログラム230(図5参照)を実行する。   (1) The communication unit 1030 communicates with each of a plurality of slave devices constituting the slave system via the field network 2. The control program execution unit 1020 executes a control program 230 (see FIG. 5) including the user program 236.

ライブラリ280には、スレーブ装置を無効な状態から有効な状態へ変更するための機能を実現するためのプログラム281と、スレーブ装置を有効な状態から無効な状態へ変更するための機能を実現するためのプログラム282とが含まる。   The library 280 implements a program 281 for realizing a function for changing a slave device from an invalid state to an valid state, and a function for changing the slave device from an valid state to an invalid state. Program 282.

ユーザプログラム236には、予め定められた第1の入力(ディップスイッチを介した入力、表示器を介した入力等)を受け付けた場合に、複数のスレーブ装置のうちの指定された第1のスレーブ装置(たとえば、図6におけるスレーブ装置C)の状態を変更対象として第1のプログラム(たとえばプログラム281)の実行を指示するための記述(たとえば、図3の有効FB291,図15の有効FB297)が含まれている。   When the user program 236 receives a predetermined first input (input via a DIP switch, input via a display, etc.), a designated first slave among a plurality of slave devices is received. Descriptions (for example, the effective FB 291 in FIG. 3 and the effective FB 297 in FIG. 15) for instructing the execution of the first program (for example, the program 281) with the state of the device (for example, the slave device C in FIG. 6) as a change target are provided. include.

(2)ユーザプログラム236には、上記第1の入力とは異なる第2の入力を受け付けた場合に、複数のスレーブ装置のうちの指定された第2のスレーブ装置(たとえば、図6におけるスレーブ装置D)の状態を変更対象として上記第1のプログラムの実行を指示するための記述がさらに含まれている。   (2) When the user program 236 receives a second input different from the first input, the second slave device designated among the plurality of slave devices (for example, the slave device in FIG. 6) A description for instructing execution of the first program with the state of D) as a change target is further included.

(3)制御プログラム実行部1020は、第1のプログラムを利用することにより、システム構成情報240を変更する。具体的には、制御プログラム実行部1020は、システム構成情報240におけるスレーブ装置の状態情報(図8参照)を変更する処理を行なうことによって、スレーブ装置の状態を変更する機能を実現する。たとえば、制御プログラム1020は、スレーブ装置を無効にするときには、スレーブ装置の状態をオペレーショナル状態からプレオペレーショナル状態に変更する処理を行なうことによって、スレーブ装置の状態を変更する機能を実現する。   (3) The control program execution unit 1020 changes the system configuration information 240 by using the first program. Specifically, the control program execution unit 1020 realizes a function of changing the status of the slave device by performing processing for changing the status information (see FIG. 8) of the slave device in the system configuration information 240. For example, when invalidating a slave device, the control program 1020 realizes a function of changing the state of the slave device by performing a process of changing the state of the slave device from the operational state to the pre-operational state.

(4)ライブラリ280には、スレーブ装置に割り付けられたモーション制御の制御対象である軸を無効な状態から有効な状態へ変更するための機能を実現するためのプログラム283と、軸を有効な状態から無効な状態へ変更するための機能を実現するためのプログラム284がさらに含まれている。   (4) The library 280 includes a program 283 for realizing a function for changing an axis that is a control target of motion control assigned to the slave device from an invalid state to an valid state, and an axis valid state Further included is a program 284 for realizing a function for changing from an invalid state to an invalid state.

ユーザプログラム236には、上記第1の入力を受け付けた場合に、上記第1のスレーブ装置の状態を変更対象として第2のプログラム(たとえばプログラム283)の実行を指示するための記述と、上記第2の入力を受け付けた場合に、上記第2のスレーブ装置の状態を変更対象として上記第2のプログラムの実行を指示するための記述がさらに含まれている。   In the user program 236, when the first input is received, a description for instructing execution of a second program (for example, the program 283) with the state of the first slave device as a change target, and the first A description is further included for instructing the execution of the second program with the state of the second slave device as a change target when the second input is received.

PLC1は、上述したように、変数テーブル250における状態情報を変更する処理を行なうことによって、軸の状態を変更する。   As described above, the PLC 1 changes the state of the axis by performing the process of changing the state information in the variable table 250.

(5)制御プログラム実行部1020は、ある局面において、上記第1の入力を受け付けた場合、軸を有効な状態から無効な状態へ変更するための機能を実現するプログラム284の実行がなされた後に、スレーブ装置を有効な状態から無効な状態へ変更するための機能を実現するためのプログラム282を実行をする。   (5) In a certain situation, when the first input is received, the control program execution unit 1020 executes the program 284 that realizes the function for changing the axis from the valid state to the invalid state. Then, the program 282 for realizing the function for changing the slave device from the valid state to the invalid state is executed.

(6)変更部1040は、PLCサポート装置8からの指示に基づき、記憶部1010に記憶されているシステム構成情報240を変更する。具体的には、変更部1040は、システム構成情報240におけるスレーブ装置の状態情報(図8参照)を変更する。制御プログラム実行部1020は、システム構成情報240の変更に基づき、スレーブ装置の状態を変更する機能を実現する。   (6) The changing unit 1040 changes the system configuration information 240 stored in the storage unit 1010 based on an instruction from the PLC support device 8. Specifically, the changing unit 1040 changes the status information (see FIG. 8) of the slave device in the system configuration information 240. The control program execution unit 1020 realizes a function of changing the state of the slave device based on the change of the system configuration information 240.

<H.サポート装置>
(h1.ハードウェア構成)
図19は、本発明の実施の形態に係るCPUユニット13に接続して用いられるPLCサポート装置8のハードウェア構成を示す模式図である。図19を参照して、PLCサポート装置8は、典型的には、汎用のコンピュータで構成される。なお、メンテナンス性の観点からは、可搬性に優れたノート型のパーソナルコンピュータが好ましい。
<H. Support equipment>
(H1. Hardware configuration)
FIG. 19 is a schematic diagram showing a hardware configuration of the PLC support device 8 used by being connected to the CPU unit 13 according to the embodiment of the present invention. Referring to FIG. 19, PLC support device 8 is typically composed of a general-purpose computer. From the viewpoint of maintainability, a notebook personal computer with excellent portability is preferable.

図19を参照して、PLCサポート装置8は、OSを含む各種プログラムを実行するCPU81と、BIOSや各種データを格納するROM(Read Only Memory)82と、CPU81でのプログラムの実行に必要なデータを格納するための作業領域を提供するメモリRAM83と、CPU81で実行されるプログラムなどを不揮発的に格納するハードディスク(HDD)84とを含む。   Referring to FIG. 19, the PLC support device 8 includes a CPU 81 that executes various programs including an OS, a ROM (Read Only Memory) 82 that stores BIOS and various data, and data necessary for the CPU 81 to execute the programs. A memory RAM 83 that provides a work area for storing the program, and a hard disk (HDD) 84 that stores programs executed by the CPU 81 in a nonvolatile manner.

PLCサポート装置8は、さらに、ユーザからの操作を受け付けるキーボード85およびマウス86と、情報をユーザに提示するためのディスプレイ87とを含む。さらに、PLCサポート装置8は、PLC1(CPUユニット13)などと通信するための通信インターフェイス(IF)を含む。   The PLC support device 8 further includes a keyboard 85 and a mouse 86 that receive operations from the user, and a display 87 for presenting information to the user. Furthermore, the PLC support device 8 includes a communication interface (IF) for communicating with the PLC 1 (CPU unit 13) and the like.

後述するように、PLCサポート装置8で実行される各種プログラムは、CD−ROM9に格納されて流通する。このCD−ROM9に格納されたプログラムは、CD−ROM(Compact Disk-Read Only Memory)ドライブ88によって読取られ、ハードディスク(HDD)84などへ格納される。あるいは、上位のホストコンピュータなどからネットワークを通じてプログラムをダウンロードするように構成してもよい。   As will be described later, various programs executed by the PLC support device 8 are stored in the CD-ROM 9 and distributed. The program stored in the CD-ROM 9 is read by a CD-ROM (Compact Disk-Read Only Memory) drive 88 and stored in a hard disk (HDD) 84 or the like. Alternatively, the program may be downloaded from a host computer or the like via a network.

上述したように、PLCサポート装置8は、汎用的なコンピュータを用いて実現されるので、これ以上の詳細な説明は行わない。   As described above, since the PLC support device 8 is realized by using a general-purpose computer, no further detailed description will be given.

(h2.ソフトウェア構成)
図20は、本発明の実施の形態に係るCPUユニット13に接続して用いられるPLCサポート装置8のソフトウェア構成を示す模式図である。図20を参照して、PLCサポート装置8ではOS310が実行され、PLCサポートプログラム320に含まれる各種のプログラムを実行可能な環境が提供される。
(H2. Software configuration)
FIG. 20 is a schematic diagram showing a software configuration of the PLC support device 8 used by being connected to the CPU unit 13 according to the embodiment of the present invention. Referring to FIG. 20, the PLC support device 8 executes the OS 310 and provides an environment in which various programs included in the PLC support program 320 can be executed.

PLCサポートプログラム320は、エディタプログラム321と、コンパイラプログラム322と、デバッガプログラム323と、シミュレーション用シーケンス命令演算プログラム324と、シミュレーション用モーション演算プログラム325と、通信プログラム326とを含む。PLCサポートプログラム320に含まれるそれぞれのプログラムは、典型的には、CD−ROM9に格納された状態で流通して、PLCサポート装置8にインストールされる。   The PLC support program 320 includes an editor program 321, a compiler program 322, a debugger program 323, a simulation sequence instruction calculation program 324, a simulation motion calculation program 325, and a communication program 326. Each program included in the PLC support program 320 is typically distributed in a state stored in the CD-ROM 9 and installed in the PLC support device 8.

エディタプログラム321は、実行可能なオブジェクトプログラム形式のユーザプログラム236を作成するための入力および編集といった機能を提供する。より具体的には、エディタプログラム321は、ユーザがキーボード85やマウス86を操作してユーザプログラム236のソース形式のユーザプログラム330を作成する機能に加えて、作成したユーザプログラム330の保存機能および編集機能を提供する。また、エディタプログラム321は、外部からのユーザプログラム330の入力を受け付ける。   The editor program 321 provides functions such as input and editing for creating a user program 236 in an executable object program format. More specifically, the editor program 321 has a function of saving and editing the created user program 330 in addition to the function of the user operating the keyboard 85 and the mouse 86 to create the source program 330 of the user program 236. Provide functionality. The editor program 321 accepts an input from the user program 330 from the outside.

コンパイラプログラム322は、ユーザプログラム330をコンパイルして、CPUユニット13のマイクロプロセッサ100で実行可能なオブジェクトプログラム形式のユーザプログラム236を生成する機能を提供する。また、コンパイラプログラム322は、ユーザプログラム330をコンパイルして、PLCサポート装置8のCPU81で実行可能なオブジェクトプログラム形式のユーザプログラム340を生成する機能を提供する。このユーザプログラム340は、PLCサポート装置8によってPLC1の動作をシミュレート(模擬)するために使用される、シミュレーション用のオブジェクトプログラムである。   The compiler program 322 provides a function of compiling the user program 330 and generating a user program 236 in an object program format that can be executed by the microprocessor 100 of the CPU unit 13. The compiler program 322 provides a function of compiling the user program 330 and generating a user program 340 in an object program format that can be executed by the CPU 81 of the PLC support device 8. The user program 340 is a simulation object program used for simulating the operation of the PLC 1 by the PLC support device 8.

デバッガプログラム323は、ユーザプログラムのソースプログラムに対してデバッグを行なうための機能を提供する。このデバッグの内容としては、ソースプログラムのうちユーザが指定した範囲を部分的に実行する、ソースプログラムの実行中における変数値の時間的な変化を追跡する、といった動作を含む。   The debugger program 323 provides a function for debugging the source program of the user program. The contents of the debugging include operations such as partially executing a range designated by the user in the source program, and tracking temporal changes in variable values during the execution of the source program.

デバッガプログラム323は、さらに、シミュレーション用のオブジェクトプログラムであるユーザプログラム340を実行する機能を提供する。このシミュレーション時には、CPUユニット13のシステムプログラムに含まれるシーケンス命令演算プログラム232およびモーション演算プログラム234に代えて、PLCサポートプログラム320に含まれるシミュレーション用シーケンス命令演算プログラム324およびシミュレーション用モーション演算プログラム325が用いられる。   The debugger program 323 further provides a function of executing a user program 340 that is an object program for simulation. In this simulation, the sequence instruction calculation program 324 and the simulation motion calculation program 325 included in the PLC support program 320 are used instead of the sequence instruction calculation program 232 and the motion calculation program 234 included in the system program of the CPU unit 13. It is done.

通信プログラム326は、PLC1のCPUユニット13へユーザプログラム236を転送する機能を提供する。   The communication program 326 provides a function of transferring the user program 236 to the CPU unit 13 of the PLC 1.

一般的には、PLC1に実装されるシステムプログラム210は、CPUユニット13の製造段階でCPUユニット13の不揮発性メモリ106へ格納される。但し、CD−R
OM9にシステムプログラム210を格納しておけば、ユーザは、CD−ROM9のシステムプログラム210をPLCサポート装置8へコピーし、通信プログラム326が提供する機能を利用してコピーしたシステムプログラム210をCPUユニット13へ転送することもできる。さらに、CD−ROM9に、PLC1のCPUユニット13で実行されるリアルタイムOS200を格納しておけば、リアルタイムOS200についてもユーザ操作によってPLC1へ再インストールできる。
Generally, the system program 210 mounted on the PLC 1 is stored in the nonvolatile memory 106 of the CPU unit 13 at the manufacturing stage of the CPU unit 13. However, CD-R
If the system program 210 is stored in the OM 9, the user copies the system program 210 of the CD-ROM 9 to the PLC support device 8 and uses the function provided by the communication program 326 to copy the system program 210 to the CPU unit. 13 can also be transferred. Furthermore, if the real-time OS 200 executed by the CPU unit 13 of the PLC 1 is stored in the CD-ROM 9, the real-time OS 200 can also be reinstalled in the PLC 1 by a user operation.

図21は、ユーザプログラム330の一部を表示した図である。図21を参照して、PLCサポート装置8のユーザは、PLCサポート装置8のエディタプログラム321を利用してソース形式のユーザプログラム330を作成する。PLCサポート装置8は、当該作成されたユーザプログラム330をコンパイルすることにより、オブジェクトプログラム形式のユーザプログラム236を生成する。   FIG. 21 is a diagram showing a part of the user program 330. Referring to FIG. 21, the user of PLC support device 8 creates user program 330 in the source format using editor program 321 of PLC support device 8. The PLC support device 8 generates a user program 236 in an object program format by compiling the created user program 330.

<I.変形例>
上記においては、図2に示したとおり、PLC1が、プロジェクト270をPLCサポート装置8から受信する以前にライブラリ280を格納している構成を例に挙げて説明したが、これに限定されるものではない。たとえば、PLCサポート装置8においてコンパイルした、ユーザプログラム236と、システム構成情報240と、変数テーブル250と、ライブラリ280とを、PLC1が受信する構成としてもよい。
<I. Modification>
In the above description, as illustrated in FIG. 2, the configuration in which the PLC 1 stores the library 280 before receiving the project 270 from the PLC support device 8 has been described as an example. However, the configuration is not limited thereto. Absent. For example, the PLC 1 may receive the user program 236, the system configuration information 240, the variable table 250, and the library 280 compiled by the PLC support device 8.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

1 PLC、2 フィールドネットワーク、3 サーボモータドライバ、4 サーボモータ、5 リモートIOターミナル、6 検出スイッチ、7 リレー、8 PLCサポート装置、9 CD−ROM、10 接続ケーブル、11 PLCシステムバス、12 電源ユニット、13 CPUユニット、14,53 IOユニット、15 特殊ユニット、51 ターミナルバス、52 通信カプラ、281,282,283,284 プログラム、230,1020 制御プログラム、232 シーケンス命令演算プログラム、234 モーション演算プログラム、236,330,340 ユーザプログラム、240 システム構成情報、250 変数テーブル、270 プロジェクト、280 ライブラリ、291 記述、320 サポートプログラム、321 エディタプログラム、322 コンパイラプログラム、326 通信プログラム、1010 記憶部、1020 制御プログラム実行部、1030 通信部、1040 変更部、A〜D,J〜L,S,T スレーブ装置、D11 プロセスデータ、G,H,P,Q 機械、SYS PLCシステム、X,Y1,Y2 ライン。   1 PLC, 2 field network, 3 servo motor driver, 4 servo motor, 5 remote IO terminal, 6 detection switch, 7 relay, 8 PLC support device, 9 CD-ROM, 10 connection cable, 11 PLC system bus, 12 power supply unit , 13 CPU unit, 14, 53 IO unit, 15 special unit, 51 terminal bus, 52 communication coupler, 281, 282, 283, 284 program, 230, 1020 control program, 232 sequence command calculation program, 234 motion calculation program, 236 , 330, 340 User program, 240 System configuration information, 250 variable table, 270 project, 280 library, 291 description, 320 support program, 3 1 editor program, 322 compiler program, 326 communication program, 1010 storage unit, 1020 control program execution unit, 1030 communication unit, 1040 change unit, A to D, J to L, S, T slave device, D11 process data, G, H, P, Q machine, SYS PLC system, X, Y1, Y2 line.

Claims (11)

マスタ装置として機能する制御装置であって、
スレーブ側のシステムを構成する複数のスレーブ装置の各々と、ネットワークを介して通信するための通信部と、
前記システムの構成に対応したユーザプログラムと、前記ユーザプログラムによって利用されるプログラムライブラリとを記憶した記憶部と、
前記ユーザプログラムを実行するための実行部とを備え、
前記プログラムライブラリに記憶されたプログラムは、前記スレーブ装置を無効な状態から有効な状態へ変更するための機能および前記スレーブ装置を有効な状態から無効な状態へ変更するための機能のいずれか一方を実現し、
前記ユーザプログラムには、前記複数のスレーブ装置を指定する記述と、記述されたスレーブ装置の状態を変更対象としてプログラムライブラリに記憶されたプログラムの実行を指示するための記述が含まれている、制御装置。
A control device functioning as a master device,
A communication unit for communicating with each of a plurality of slave devices constituting a system on the slave side via a network,
A storage unit storing a user program corresponding to the configuration of the system and a program library used by the user program;
An execution unit for executing the user program,
The program stored in the program library has one of a function for changing the slave device from an invalid state to an valid state and a function for changing the slave device from an valid state to an invalid state. Realized,
The user program includes a description for designating the plurality of slave devices and a description for instructing execution of a program stored in a program library with the state of the described slave devices being changed. apparatus.
前記記憶部は、前記システムの構成を表した構成情報をさらに記憶し、
前記実行部は、前記構成情報を変更する処理を行なうことによって、前記いずれか一方の機能を実現する、請求項1に記載の制御装置。
The storage unit further stores configuration information representing the configuration of the system,
The control device according to claim 1, wherein the execution unit realizes one of the functions by performing a process of changing the configuration information.
前記制御装置は、モーション制御を行ない、
前記プログラムライブラリには、前記スレーブ装置に割り付けられた前記モーション制御の制御対象である軸を無効な状態から有効な状態へ変更するための機能および前記軸を有効な状態から無効な状態へ変更するための機能のいずれか一方を実現するためのプログラムがさらに記憶されている、請求項1または2に記載の制御装置。
The control device performs motion control,
The program library includes a function for changing an axis that is a control target of the motion control assigned to the slave device from an invalid state to an valid state, and changes the axis from an valid state to an invalid state. The control device according to claim 1, further storing a program for realizing any one of the functions for executing the function.
前記実行部は、前記軸を有効な状態から無効な状態へ変更するための機能を実現するプログラムを実行した後に、前記スレーブ装置を有効な状態から無効な状態へ変更するための機能を実現するプログラムを実行する、請求項3に記載の制御装置。   The execution unit implements a function for changing the slave device from an effective state to an invalid state after executing a program for realizing a function for changing the axis from an effective state to an invalid state. The control device according to claim 3, which executes a program. 前記ユーザプログラムの作成を行なうための支援装置からの指示に基づき、前記構成情報を変更する変更部をさらに備え、
前記実行部は、前記構成情報が変更されたことに基づき、前記いずれか一方の機能を実現する、請求項2に記載の制御装置。
Based on an instruction from the support device for creating the user program, further comprising a changing unit for changing the configuration information,
The control device according to claim 2, wherein the execution unit realizes one of the functions based on a change in the configuration information.
前記有効な状態は、定周期でリアルタイムの情報交換を行なうプロセスデータオブジェクトを使用した通信が可能な状態であり、
前記無効な状態は、前記プロセスデータオブジェクトを使用した通信が不可能な状態である、請求項1または2に記載の制御装置。
The effective state is a state in which communication using a process data object that performs real-time information exchange at a fixed period is possible,
The control device according to claim 1, wherein the invalid state is a state in which communication using the process data object is impossible.
前記ネットワークは、EtherCAT(登録商標)ネットワークであり、
前記有効な状態は、オペレーショナル状態であり、
前記無効な状態は、前記オペレーショナル状態以外の状態である、請求項6に記載の制御装置。
The network is an EtherCAT (registered trademark) network,
The valid state is an operational state,
The control device according to claim 6, wherein the invalid state is a state other than the operational state.
スレーブとして接続されるスレーブ装置を制御するマスタ装置として機能する制御装置であって、
ユーザプログラムと、前記ユーザプログラム内で呼び出されて、当該ユーザプログラム内で指定されたスレーブに対する有効指定または無効指定の情報に対応して、当該指定されたスレーブについて有効または無効を設定する設定プログラムとを記憶した記憶部と、
前記ユーザプログラムを実行するための実行部と、を備える制御装置。
A control device that functions as a master device for controlling a slave device connected as a slave,
A user program and a setting program that is called in the user program and sets valid / invalid for the designated slave in response to valid / invalid designation information for the slave designated in the user program; A storage unit that stores
A control device comprising: an execution unit for executing the user program.
前記スレーブ装置とネットワークを介して通信するための通信部を備え、
前記実行部は、ユーザプログラムの実行により、前記設定プログラムで無効と設定されたスレーブに対して、当該スレーブへ無効と設定された情報を送り、または、当該スレーブに対してスレーブ装置を制御させない指令を送り、もしくは、当該スレーブに対してスレーブ装置を制御する情報を送らない、請求項8に記載の制御装置。
A communication unit for communicating with the slave device via a network;
The execution unit sends information set to invalid to the slave set to invalid by the setting program by execution of the user program, or instructs the slave not to control the slave device. The control device according to claim 8, wherein information for controlling the slave device is not sent to the slave.
スレーブ側のシステムを構成する複数のスレーブ装置の各々と、ネットワークを介して通信する、マスタ装置として機能する制御装置における制御方法であって、
前記システムの構成に対応した、各前記スレーブ装置を動作させるためのユーザプログラムを記憶するステップと、
前記ユーザプログラムを実行するステップとを備え、
前記制御装置は、前記ユーザプログラムによって利用されるプログラムライブラリを記憶しており、
前記プログラムライブラリに記憶されたプログラムは、前記スレーブ装置を無効な状態から有効な状態へ変更するための機能および前記スレーブ装置を有効な状態から無効な状態へ変更するための機能のいずれか一方を実現し、
前記ユーザプログラムには、前記複数のスレーブ装置を指定する記述と、記述されたスレーブ装置の状態を変更対象としてプログラムライブラリに記憶されたプログラムの実行を指示するための記述が含まれている、制御方法。
A control method in a control device functioning as a master device that communicates with each of a plurality of slave devices constituting a slave side system via a network,
Storing a user program for operating each slave device corresponding to the configuration of the system;
Executing the user program,
The control device stores a program library used by the user program,
The program stored in the program library has one of a function for changing the slave device from an invalid state to an valid state and a function for changing the slave device from an valid state to an invalid state. Realized,
The user program includes a description for designating the plurality of slave devices and a description for instructing execution of a program stored in a program library with the state of the described slave devices being changed. Method.
スレーブ側のシステムを構成する複数のスレーブ装置の各々と、ネットワークを介して通信する、マスタ装置として機能する制御装置を制御するプログラムであって、
前記システムの構成に対応した、各前記スレーブ装置を動作させるためのユーザプログラムを記憶するステップと、
前記ユーザプログラムを実行するステップとを、前記制御装置のプロセッサに実行させ、
前記制御装置は、前記ユーザプログラムによって利用される予め定められたプログラムライブラリを記憶しており、
前記プログラムライブラリに記憶されたプログラムは、前記スレーブ装置を無効な状態から有効な状態へ変更するための機能および前記スレーブ装置を有効な状態から無効な状態へ変更するための機能のいずれか一方を実現し、
前記ユーザプログラムには、前記複数のスレーブ装置を指定する記述と、記述されたスレーブ装置の状態を変更対象としてプログラムライブラリに記憶されたプログラムの実行を指示するための記述が含まれている、プログラム。
A program for controlling a control device functioning as a master device that communicates with each of a plurality of slave devices constituting a slave-side system via a network,
Storing a user program for operating each slave device corresponding to the configuration of the system;
Causing the processor of the control device to execute the step of executing the user program;
The control device stores a predetermined program library used by the user program,
The program stored in the program library has one of a function for changing the slave device from an invalid state to an valid state and a function for changing the slave device from an valid state to an invalid state. Realized,
The user program includes a description for specifying the plurality of slave devices and a description for instructing execution of a program stored in a program library with the state of the described slave devices as a change target. .
JP2013012581A 2013-01-25 2013-01-25 Control device, control method, and program Active JP6299064B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013012581A JP6299064B2 (en) 2013-01-25 2013-01-25 Control device, control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013012581A JP6299064B2 (en) 2013-01-25 2013-01-25 Control device, control method, and program

Publications (2)

Publication Number Publication Date
JP2014146070A true JP2014146070A (en) 2014-08-14
JP6299064B2 JP6299064B2 (en) 2018-03-28

Family

ID=51426314

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013012581A Active JP6299064B2 (en) 2013-01-25 2013-01-25 Control device, control method, and program

Country Status (1)

Country Link
JP (1) JP6299064B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017010158A (en) * 2015-06-18 2017-01-12 株式会社安川電機 Programmable controller
WO2019176287A1 (en) 2018-03-13 2019-09-19 オムロン株式会社 Control device, control system, control method, and control program
WO2019176286A1 (en) 2018-03-13 2019-09-19 オムロン株式会社 Control device, control method, and control program
KR20190121012A (en) * 2018-04-17 2019-10-25 엘에스산전 주식회사 Motion control system and control method thereof
JP2020150451A (en) * 2019-03-14 2020-09-17 オムロン株式会社 Control system and control unit
JP2020187486A (en) * 2019-05-13 2020-11-19 オムロン株式会社 Control apparatus
JPWO2021002421A1 (en) * 2019-07-04 2021-01-07
CN113508562A (en) * 2019-03-14 2021-10-15 欧姆龙株式会社 Control system and control device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004192432A (en) * 2002-12-12 2004-07-08 Fuji Electric Fa Components & Systems Co Ltd Control system
JP2009099068A (en) * 2007-10-18 2009-05-07 Yaskawa Electric Corp Motion controller and motion program effective axis determination method
JP2012194670A (en) * 2011-03-15 2012-10-11 Omron Corp Cpu unit for plc, system program for plc and recording medium for storing system program for plc

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004192432A (en) * 2002-12-12 2004-07-08 Fuji Electric Fa Components & Systems Co Ltd Control system
JP2009099068A (en) * 2007-10-18 2009-05-07 Yaskawa Electric Corp Motion controller and motion program effective axis determination method
JP2012194670A (en) * 2011-03-15 2012-10-11 Omron Corp Cpu unit for plc, system program for plc and recording medium for storing system program for plc

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ETHERCAT SLAVE IMPLEMENTATION GUIDE, JPN7016003741, 2012, pages 19 - 22, ISSN: 0003590219 *
FUNCTION BLOCK FOR MOTION CONTROL PART4, JPN7016003739, 3 December 2008 (2008-12-03), pages 19 - 21, ISSN: 0003590218 *
NJ/NX-SERIES CPU UNIT SOFTWARE USER'S MANUAL W501-E1-12, JPN7016003737, 2011, pages 2 - 2, ISSN: 0003590216 *
SIMATIC SYSTEM SOFTWARE FOR S7-300/400 REFERENCE MANUAL, JPN7016003738, March 2006 (2006-03-01), pages 16 - 10, ISSN: 0003590217 *

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017010158A (en) * 2015-06-18 2017-01-12 株式会社安川電機 Programmable controller
US11092945B2 (en) 2018-03-13 2021-08-17 Omron Corporation Control device, control method, and non-transitory storage medium storing control program
WO2019176287A1 (en) 2018-03-13 2019-09-19 オムロン株式会社 Control device, control system, control method, and control program
JP2019159754A (en) * 2018-03-13 2019-09-19 オムロン株式会社 Control device, control system, control method, and control program
WO2019176286A1 (en) 2018-03-13 2019-09-19 オムロン株式会社 Control device, control method, and control program
US11251990B2 (en) 2018-03-13 2022-02-15 Omron Corporation Control device, control system, control method, and non-transitory storage medium storing control program
KR20190121012A (en) * 2018-04-17 2019-10-25 엘에스산전 주식회사 Motion control system and control method thereof
KR102434129B1 (en) * 2018-04-17 2022-08-18 엘에스일렉트릭(주) Motion control system and control method thereof
JP2020150451A (en) * 2019-03-14 2020-09-17 オムロン株式会社 Control system and control unit
JP7070479B2 (en) 2019-03-14 2022-05-18 オムロン株式会社 Control system and control unit
CN113508562B (en) * 2019-03-14 2023-08-25 欧姆龙株式会社 Control system and control device
CN113508561A (en) * 2019-03-14 2021-10-15 欧姆龙株式会社 Control system and control device
CN113508562A (en) * 2019-03-14 2021-10-15 欧姆龙株式会社 Control system and control device
CN113508561B (en) * 2019-03-14 2023-08-25 欧姆龙株式会社 Control system and control device
WO2020184034A1 (en) * 2019-03-14 2020-09-17 オムロン株式会社 Control system and control device
JP2020187486A (en) * 2019-05-13 2020-11-19 オムロン株式会社 Control apparatus
JP7230677B2 (en) 2019-05-13 2023-03-01 オムロン株式会社 Control device
CN113728588A (en) * 2019-05-13 2021-11-30 欧姆龙株式会社 Control device
WO2020230433A1 (en) 2019-05-13 2020-11-19 オムロン株式会社 Control device
US11740604B2 (en) 2019-05-13 2023-08-29 Omron Corporation Control device
JPWO2021002421A1 (en) * 2019-07-04 2021-01-07
JP7484912B2 (en) 2019-07-04 2024-05-16 オムロン株式会社 Control System

Also Published As

Publication number Publication date
JP6299064B2 (en) 2018-03-28

Similar Documents

Publication Publication Date Title
JP6299064B2 (en) Control device, control method, and program
JP4807475B1 (en) Arithmetic unit, output control method, and program
JP4894961B1 (en) PLC CPU unit, PLC system program, and recording medium storing PLC system program
JP6540166B2 (en) Control device
US9618924B2 (en) CPU of PLC, system program for PLC, and recording medium storing system program for PLC
JP6409557B2 (en) Control device, controller system, output control method, and program
JP4752984B1 (en) PLC CPU unit, PLC system program, and recording medium storing PLC system program
JP6488830B2 (en) Control device
JP6729746B2 (en) Control device
US10579031B2 (en) Controller
JP5891891B2 (en) Information processing apparatus, information processing method, and program
JP2018132829A (en) Control device
US9568905B2 (en) CPU of PLC, system program for PLC, and recording medium storing system program for PLC
JP6135247B2 (en) Information processing apparatus and information processing program
WO2012124145A1 (en) Computation unit, assistance unit, assistance program, recording medium storing assistance program, and operation method in assistance device
JP2012194955A (en) Support device, display control method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160120

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161109

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161206

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170704

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170731

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170824

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: 20180130

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180212

R150 Certificate of patent or registration of utility model

Ref document number: 6299064

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150