Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7589645B2 - CONTROL SYSTEM, SYSTEM PROGRAM, AND DEBUG METHOD - Google Patents
[go: Go Back, main page]

JP7589645B2 - CONTROL SYSTEM, SYSTEM PROGRAM, AND DEBUG METHOD - Google Patents

CONTROL SYSTEM, SYSTEM PROGRAM, AND DEBUG METHOD Download PDF

Info

Publication number
JP7589645B2
JP7589645B2 JP2021089544A JP2021089544A JP7589645B2 JP 7589645 B2 JP7589645 B2 JP 7589645B2 JP 2021089544 A JP2021089544 A JP 2021089544A JP 2021089544 A JP2021089544 A JP 2021089544A JP 7589645 B2 JP7589645 B2 JP 7589645B2
Authority
JP
Japan
Prior art keywords
value
input
function block
address
change
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2021089544A
Other languages
Japanese (ja)
Other versions
JP2022182160A (en
Inventor
嘉英 田村
康裕 安達
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp filed Critical Omron Corp
Priority to JP2021089544A priority Critical patent/JP7589645B2/en
Priority to PCT/JP2022/014417 priority patent/WO2022249713A1/en
Publication of JP2022182160A publication Critical patent/JP2022182160A/en
Application granted granted Critical
Publication of JP7589645B2 publication Critical patent/JP7589645B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/04Program control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Description

本発明は、制御システム、システムプログラムおよびデバッグ方法に関する。 The present invention relates to a control system, a system program, and a debugging method.

FA(Factory Automation)分野においては、各種設備や各種機械を制御するための制御装置として、PLC(プログラマブルロジックコントローラ)が多く使用されている。 In the field of factory automation (FA), programmable logic controllers (PLCs) are widely used as control devices for controlling various types of equipment and machinery.

通常、PLCで実行されるユーザプログラム(制御ロジックを記述したプログラム)は、開発支援装置において開発される。そして、開発支援装置からPLCに対してユーザプログラムが送信される。さらに、開発支援装置を操作して、PLCで実行されるユーザプログラムに対してデバッグなどが可能になっている。 Typically, user programs (programs that describe control logic) that are executed by PLCs are developed on a development support device. The development support device then transmits the user programs to the PLC. Furthermore, the development support device can be used to debug user programs executed by the PLC.

また、PLCで実行されるユーザプログラムは、国際電気標準会議(IEC:International Electrotechnical Commission)が定めるIEC61131-3で規定されるいずれかの言語で記述されることが一般的である。IEC61131-3においては、POU(プログラム構成ユニット)として、メインプログラム、ファンクションブロック、ファンクションが規定されている。また、IEC61131-3においては、POUで利用できる変数についても規定されている。 Furthermore, user programs executed by PLCs are generally written in one of the languages specified in IEC 61131-3, established by the International Electrotechnical Commission (IEC). IEC 61131-3 specifies main programs, function blocks, and functions as POUs (program unit). IEC 61131-3 also specifies variables that can be used in POUs.

ファンクションブロックに関して、特開2009-104227号公報(特許文献1)は、呼び出し階層上位のプログラム部分だけ、或いは中間のファンクションブロックだけを抽出して任意の単位で部品化でき、再利用の利便性を向上させる方法などを開示する。 Regarding function blocks, Japanese Patent Application Laid-Open Publication No. 2009-104227 (Patent Document 1) discloses a method for extracting only the program parts at the top of the calling hierarchy, or only the intermediate function blocks, and modularizing them in any unit, thereby improving the convenience of reuse.

特開2009-104227号公報JP 2009-104227 A

上述したようなファンクションブロックを含むユーザプログラムのデバッグをより効率的に行うための方法が要望されている。 There is a demand for a more efficient method of debugging user programs that include function blocks such as those described above.

本発明は、ファンクションブロックを含むユーザプログラムをより効率的にデバッグするための手段を提供することを目的とする。 The present invention aims to provide a means for more efficiently debugging user programs that include function blocks.

ある実施の形態に係る制御システムは、ファンクションブロックを含むユーザプログラムを実行する演算処理部と、ユーザプログラムが参照するデータを保持するデータ保持部と、ユーザ操作に応じて、演算処理部が実行するユーザプログラムが参照するデータの値を変更するための指示を発行する指示発行部と、ファンクションブロックに関連付けられた入出力変数の値の変更が指示されると、当該ファンクションブロックの過去の実行状態を参照することで、入出力変数に対応付けられたデータ保持部のアドレスを特定するアドレス特定部と、データ保持部の特定されたアドレスに保持されている値を指示された値に変更する変更部とを含む。 A control system according to one embodiment includes a computation processing unit that executes a user program including a function block, a data holding unit that holds data referenced by the user program, an instruction issuing unit that issues an instruction to change the value of the data referenced by the user program executed by the computation processing unit in response to a user operation, an address specifying unit that, when an instruction to change the value of an input/output variable associated with a function block is received, specifies the address of the data holding unit associated with the input/output variable by referring to a past execution state of the function block, and a modification unit that changes the value stored in the specified address of the data holding unit to the specified value.

この構成によれば、ファンクションブロックの過去の実行状態を参照することで、入出力変数に対応付けられたデータ保持部のアドレスを特定するので、入出力変数に実値が格納されていなくても、入出力変数が示す値を変更できる。入出力変数を任意の値に変更する手段を提供することで、ファンクションブロックを含むユーザプログラムをより効率的にデバッグできる。 According to this configuration, the address of the data storage unit associated with the input/output variable is identified by referencing the past execution state of the function block, so the value indicated by the input/output variable can be changed even if an actual value is not stored in the input/output variable. By providing a means to change the input/output variable to an arbitrary value, user programs that include function blocks can be debugged more efficiently.

アドレス特定部は、ファンクションブロックの前回実行時の情報を収集することで、アドレスを特定するようにしてもよい。この構成によれば、ファンクションブロックの実行において実際に利用されたアドレスを特定できる。 The address identification unit may identify the address by collecting information from the previous execution of the function block. With this configuration, it is possible to identify the address that was actually used in the execution of the function block.

アドレス特定部は、ユーザプログラムが実行完了している状態において、アドレスを特定するようにしてもよい。この構成によれば、ユーザプログラムが実行中においては、入出力変数が変更される可能性があるので、ユーザプログラムが実行完了している状態を維持することで、確実に入出力変数を変更できる。 The address identification unit may identify the address when the user program has completed execution. With this configuration, since there is a possibility that the input/output variables may be changed while the user program is running, by maintaining the user program in a state where it has completed execution, the input/output variables can be reliably changed.

制御システムは、プログラマブルロジックコントローラと、開発支援装置とを含み、アドレス特定部は、プログラマブルロジックコントローラに実装されてもよい。この構成によれば、ユーザプログラムの実行状態を容易に取得できるので、入出力変数に対応付けられたデータ保持部のアドレスを容易に特定できる。 The control system may include a programmable logic controller and a development support device, and the address identification unit may be implemented in the programmable logic controller. With this configuration, the execution state of the user program can be easily acquired, and the address of the data storage unit associated with the input/output variable can be easily identified.

制御システムは、プログラマブルロジックコントローラと、開発支援装置とを含み、アドレス特定部は、開発支援装置に実装されてもよい。この構成によれば、開発支援装置が入出力変数に対応付けられたデータ保持部のアドレスを特定するので、プログラマブルロジックコントローラの負荷の上昇を抑制できる。 The control system may include a programmable logic controller and a development support device, and the address specification unit may be implemented in the development support device. With this configuration, the development support device specifies the address of the data storage unit associated with the input/output variable, thereby suppressing an increase in the load on the programmable logic controller.

別の実施の形態によれば、ファンクションブロックを含むユーザプログラムを実行する実行環境を提供するシステムプログラムが提供される。システムプログラムは、コンピュータに、ユーザプログラムが参照するデータの値を変更するための指示を受け付けるステップと、ファンクションブロックに関連付けられた入出力変数の値の変更が指示されると、当該ファンクションブロックの過去の実行状態を参照することで、入出力変数に対応付けられたアドレスを特定するステップと、特定されたアドレスに保持されている値を指示された値に変更するステップとを実行させる。 According to another embodiment, a system program is provided that provides an execution environment for executing a user program that includes a function block. The system program causes a computer to execute the steps of: receiving an instruction to change the value of data referenced by the user program; when an instruction to change the value of an input/output variable associated with a function block is received, identifying an address associated with the input/output variable by referring to the past execution state of the function block; and changing the value held at the identified address to the instructed value.

さらに別の実施の形態によれば、ファンクションブロックを含むユーザプログラムをデバッグするデバッグ方法が提供される。デバッグ方法は、ユーザプログラムが参照するデータの値を変更するための指示を受け付けるステップと、ファンクションブロックに関連付けられた入出力変数の値の変更が指示されると、当該ファンクションブロックの過去の実行状態を参照することで、入出力変数に対応付けられたアドレスを特定するステップと、特定されたアドレスに保持されている値を指示された値に変更するステップとを含む。 According to yet another embodiment, a debugging method for debugging a user program including a function block is provided. The debugging method includes a step of receiving an instruction to change the value of data referenced by the user program, and when an instruction to change the value of an input/output variable associated with a function block is received, a step of identifying an address associated with the input/output variable by referring to a past execution state of the function block, and a step of changing the value held at the identified address to the instructed value.

本発明によれば、ファンクションブロックを含むユーザプログラムをより効率的にデバッグできるようになる。 The present invention makes it possible to more efficiently debug user programs that include function blocks.

本実施の形態に係る開発支援装置の主たる機能を示す模式図である。FIG. 2 is a schematic diagram showing main functions of the development support device according to the present embodiment; 本実施の形態に係る制御システムのシステム構成を概略する模式図である。1 is a schematic diagram illustrating an outline of a system configuration of a control system according to an embodiment of the present invention. 本実施の形態に係る制御システムを構成するPLCのハードウェア構成例を示す模式図である。1 is a schematic diagram illustrating an example of a hardware configuration of a PLC that constitutes a control system according to an embodiment of the present invention. 本実施の形態に係る制御システムを構成する開発支援装置のハードウェア構成例を示す模式図である。1 is a schematic diagram illustrating an example of a hardware configuration of a development support device that constitutes a control system according to an embodiment of the present invention. 本実施の形態に係る開発支援装置が提供するオンラインデバッグの一例を説明するための図である。1 is a diagram for explaining an example of online debugging provided by the development support device according to the present embodiment; 本実施の形態に係る開発支援装置が提供するファンクションブロックに対するデバッグの一例を説明するための図である。1 is a diagram for explaining an example of debugging of a function block provided by the development support device according to the present embodiment; 図6に示すオンラインデバッグに係る処理手順を示すフローチャートである。7 is a flowchart showing a processing procedure relating to the online debugging shown in FIG. 6 . 本実施の形態に係る開発支援装置が提供するファンクションブロックに対するデバッグの別の一例を説明するための図である。11 is a diagram for explaining another example of debugging of a function block provided by the development support device according to the present embodiment; FIG. 図8に示すオンラインデバッグに係る処理手順を示すフローチャートである。9 is a flowchart showing a processing procedure relating to the online debugging shown in FIG. 8 . 本実施の形態に係る開発支援装置が提供するオンラインデバッグに係るユーザインターフェイス画面の一例を示す模式図である。1 is a schematic diagram showing an example of a user interface screen relating to online debugging provided by the development support device according to the present embodiment;

本技術の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰り返さない。 The embodiment of the present technology will be described in detail with reference to the drawings. Note that the same or equivalent parts in the drawings will be given the same reference numerals and their description will not be repeated.

<A.適用例>
まず、本発明が適用される場面の一例について説明する。図1は、本実施の形態に係る制御システム1の概要を示す模式図である。図1を参照して、制御システム1は、ファンクションブロック150を含むユーザプログラム114を実行する演算処理部50を有している。演算処理部50は、典型的には、PLCのプロセッサ102によって実現されてもよい。制御システム1は、演算処理部50に関連付けて、ユーザプログラム114が参照するデータを保持するデータ保持部140を有している。データ保持部140は、典型的には、PLCのメインメモリ104によって実現されてもよい。
<A. Application Examples>
First, an example of a situation in which the present invention is applied will be described. Fig. 1 is a schematic diagram showing an overview of a control system 1 according to the present embodiment. Referring to Fig. 1, the control system 1 has an arithmetic processing unit 50 that executes a user program 114 including a function block 150. The arithmetic processing unit 50 may be typically realized by a processor 102 of a PLC. The control system 1 has a data holding unit 140 that is associated with the arithmetic processing unit 50 and holds data referenced by the user program 114. The data holding unit 140 may typically be realized by a main memory 104 of the PLC.

指示発行部260は、ユーザ操作に応じて、演算処理部50が実行するユーザプログラム114が参照するデータの値を変更するための指示を発行する。典型的には、指示発行部260は、PLCに接続される開発支援装置に実装されてもよい。 The instruction issuing unit 260 issues an instruction to change the value of data referenced by the user program 114 executed by the calculation processing unit 50 in response to a user operation. Typically, the instruction issuing unit 260 may be implemented in a development support device connected to the PLC.

アドレス特定モジュール170は、ファンクションブロック150に関連付けられた入出力変数156の値の変更が指示されると、ファンクションブロック150の過去の実行状態を参照することで、入出力変数156に対応付けられたデータ保持部140のアドレスを特定する。変更モジュール180は、データ保持部140の特定されたアドレスに保持されている値を指示された値に変更する。 When the address identification module 170 is instructed to change the value of the input/output variable 156 associated with the function block 150, it identifies the address of the data storage unit 140 associated with the input/output variable 156 by referring to the past execution state of the function block 150. The change module 180 changes the value stored at the identified address of the data storage unit 140 to the instructed value.

このような構成を採用することで、ファンクションブロック150に関連付けられた入出力変数の値を任意に変更することで、ファンクションブロック150およびファンクションブロック150を含むユーザプログラム114の挙動を異ならせて、必要なデバッグを容易に行うことができる。 By adopting such a configuration, the values of the input/output variables associated with the function block 150 can be arbitrarily changed to change the behavior of the function block 150 and the user program 114 that includes the function block 150, making it easy to perform the necessary debugging.

<B.制御システム構成>
次に、本実施の形態に係る開発支援装置を含む制御システム1の構成について説明する。
<B. Control System Configuration>
Next, a configuration of a control system 1 including a development support device according to this embodiment will be described.

(b1:全体構成)
図2は、本実施の形態に係る制御システム1のシステム構成を概略する模式図である。図2を参照して、制御システム1は、PLC100と、PLC100に接続される開発支援装置200とを含む。
(b1: Overall configuration)
2 is a schematic diagram illustrating a system configuration of a control system 1 according to the present embodiment. Referring to FIG. 2, control system 1 includes a PLC 100 and a development support device 200 connected to PLC 100.

PLC100は、ユーザプログラムを実行することで、フィールドネットワーク10に接続されたデバイスからデータの収集、収集したデータを利用した制御演算の実行、制御演算の実行結果の一部または全部のフィールドネットワーク10に接続されたデバイスへの出力、などの制御演算を実行する。 By executing a user program, the PLC 100 performs control operations such as collecting data from devices connected to the field network 10, performing control operations using the collected data, and outputting some or all of the results of the control operations to devices connected to the field network 10.

図2に示す例では、PLC100は、フィールドネットワーク10を介して、リモートI/Oデバイス12、ロボットコントローラ20およびモータドライバ30と接続されている。 In the example shown in FIG. 2, the PLC 100 is connected to a remote I/O device 12, a robot controller 20, and a motor driver 30 via a field network 10.

フィールドネットワーク10には、産業用ネットワーク用のプロトコルである、EtherCAT(登録商標)やEtherNet/IPなどを用いることができる。 The field network 10 can use protocols for industrial networks such as EtherCAT (registered trademark) and EtherNet/IP.

リモートI/Oデバイス12は、センサやアクチュエータなどのフィールドデバイス14が接続されており、センサなどにより計測されたデータをPLC100へ送信し、PLC100から受信したデータをアクチュエータなどを介して出力する。ロボットコントローラ20は、ロボット22を制御する。モータドライバ30は、モータ32を制御する。 The remote I/O device 12 is connected to field devices 14 such as sensors and actuators, and transmits data measured by the sensors to the PLC 100, and outputs data received from the PLC 100 via the actuators. The robot controller 20 controls the robot 22. The motor driver 30 controls the motor 32.

PLC100は、上位ネットワーク16を介して、HMI300およびサーバ装置400に接続されてもよい。上位ネットワーク16には、産業用ネットワーク用のプロトコルであるやEtherNet/IPなどを用いることができる。 The PLC 100 may be connected to the HMI 300 and the server device 400 via a higher-level network 16. The higher-level network 16 may use a protocol for industrial networks such as EtherNet/IP.

(b2:PLC100)
図3は、本実施の形態に係る制御システム1を構成するPLC100のハードウェア構成例を示す模式図である。図3を参照して、PLC100は、プロセッサ102と、メインメモリ104と、ストレージ110と、メモリカードインターフェイス120と、上位ネットワークコントローラ106と、フィールドネットワークコントローラ108と、ローカルバスコントローラ116と、USB(Universal Serial Bus)インターフェイスを提供するUSBコントローラ124とを含む。これらのコンポーネントは、プロセッサバス118を介して接続されている。
(b2:PLC100)
3 is a schematic diagram showing an example of a hardware configuration of the PLC 100 constituting the control system 1 according to the present embodiment. Referring to FIG. 3, the PLC 100 includes a processor 102, a main memory 104, and a storage 110. The computer includes a memory card interface 120, a host network controller 106, a field network controller 108, a local bus controller 116, and a Universal Serial Bus (USB) controller 124 that provides a USB interface. These components are connected to a processor bus. 118.

プロセッサ102は、ユーザプログラムを実行する演算処理部に相当し、CPU(Central Processing Unit)やGPU(Graphics Processing Unit)などで構成される。具体的には、プロセッサ102は、ストレージ110に格納されたシステムプログラム112およびユーザプログラム114を読み出して、メインメモリ104に展開して実行することで、制御対象に対する制御演算を実現する。 The processor 102 corresponds to an arithmetic processing unit that executes user programs, and is composed of a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit). Specifically, the processor 102 reads out the system program 112 and the user program 114 stored in the storage 110, expands them in the main memory 104, and executes them to realize control calculations for the control target.

メインメモリ104は、ユーザプログラム114が参照するデータ保持部140に相当し、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などの揮発性記憶装置などで構成される。 The main memory 104 corresponds to the data storage unit 140 referenced by the user program 114, and is composed of a volatile storage device such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory).

ストレージ110は、例えば、SSD(Solid State Drive)やHDD(Hard Disk Drive)などの不揮発性記憶装置などで構成される。ストレージ110には、基本的な機能を実現するためのシステムプログラム112、および、制御対象に応じて作成されたユーザプログラム114などが格納される。 Storage 110 is composed of a non-volatile storage device such as a solid state drive (SSD) or a hard disk drive (HDD). Storage 110 stores system programs 112 for implementing basic functions, and user programs 114 created according to the object to be controlled.

システムプログラム112は、ユーザプログラム114を実行する実行環境を提供するための命令を含む。 The system program 112 includes instructions for providing an execution environment for executing the user program 114.

ユーザプログラム114は、制御演算を実現するための命令が記述されたものであり、典型的には、シーケンス命令およびモーション命令を含み得る。ユーザプログラム114は、IEC61131-3で規定されるいずれかの言語で記述されてもよい。但し、ユーザプログラム114は、IEC61131-3で規定される言語以外のメーカ独自言語で記述されるプログラムを含んでいてもよい。 The user program 114 is a program in which instructions for implementing control operations are written, and typically includes sequence instructions and motion instructions. The user program 114 may be written in any language defined in IEC 61131-3. However, the user program 114 may also include a program written in a manufacturer-specific language other than a language defined in IEC 61131-3.

メモリカードインターフェイス120は、着脱可能な記憶媒体の一例であるメモリカード122を受け付ける。メモリカードインターフェイス120は、メモリカード122に対して任意のデータの読み書きが可能になっている。 The memory card interface 120 accepts a memory card 122, which is an example of a removable storage medium. The memory card interface 120 is capable of reading and writing any data to the memory card 122.

上位ネットワークコントローラ106は、上位ネットワーク16を介して、任意の情報処理装置(図2に示されるHMI300およびサーバ装置400など)との間でデータをやり取りする。 The upper network controller 106 exchanges data with any information processing device (such as the HMI 300 and server device 400 shown in FIG. 2) via the upper network 16.

フィールドネットワークコントローラ108は、フィールドネットワーク10を介して、それぞれのデバイスとの間でデータをやり取りする。 The field network controller 108 exchanges data with each device via the field network 10.

ローカルバスコントローラ116は、ローカルバス126を介して、PLC100に含まれる任意の機能ユニット130との間でデータをやり取りする。機能ユニット130は、例えば、アナログ信号の入力および/または出力を担当するアナログI/Oユニット、デジタル信号の入力および/または出力を担当するデジタルI/Oユニット、エンコーダなどからのパルスを受け付けるカウンタユニットなどからなる。 The local bus controller 116 exchanges data with any of the functional units 130 included in the PLC 100 via the local bus 126. The functional units 130 include, for example, an analog I/O unit responsible for input and/or output of analog signals, a digital I/O unit responsible for input and/or output of digital signals, and a counter unit that accepts pulses from an encoder or the like.

USBコントローラ124は、USB接続を介して、任意の情報処理装置(開発支援装置200など)との間でデータをやり取りする。 The USB controller 124 exchanges data with any information processing device (such as the development support device 200) via a USB connection.

(b2:開発支援装置200)
図4は、本実施の形態に係る制御システム1を構成する開発支援装置200のハードウェア構成例を示す模式図である。図4を参照して、開発支援装置200は、CPUやMPUなどのプロセッサ202と、メインメモリ204と、ストレージ210と、ネットワークコントローラ220と、USBコントローラ224と、入力部226と、表示部228とを含む。これらのコンポーネントは、バス208を介して接続される。
(b2: development support device 200)
Fig. 4 is a schematic diagram showing an example of a hardware configuration of a development support device 200 constituting the control system 1 according to the present embodiment. With reference to Fig. 4, the development support device 200 includes a processor 202 such as a CPU or an MPU, a main memory 204, a storage 210, a network controller 220, a USB controller 224, an input unit 226, and a display unit 228. These components are connected via a bus 208.

プロセッサ202は、ストレージ210に格納された各種プログラムを読み出して、メインメモリ204に展開して実行することで、開発支援装置200で必要な処理を実現する。 The processor 202 reads various programs stored in the storage 210, expands them into the main memory 204, and executes them to realize the processing required by the development support device 200.

ストレージ210は、例えば、HDDやSSDなどで構成される。ストレージ210には、典型的には、OS212と、開発プログラム214とが格納される。開発プログラム214は、ユーザプログラム114の作成や編集、ソースコードのユーザプログラム114から実行形式のユーザプログラム114の生成、後述するようなデバッグなどの処理を実現する。なお、ストレージ210には、図4に示すプログラム以外の必要なプログラムが格納されてもよい。 The storage 210 is composed of, for example, a HDD or SSD. Typically, an OS 212 and a development program 214 are stored in the storage 210. The development program 214 realizes processes such as creating and editing the user program 114, generating an executable user program 114 from the source code of the user program 114, and debugging as described below. Note that the storage 210 may store necessary programs other than the programs shown in FIG. 4.

ネットワークコントローラ220は、任意のネットワークを介して、任意の情報処理装置との間でデータをやり取りする。 The network controller 220 exchanges data with any information processing device via any network.

USBコントローラ224は、USB接続を介して、任意の情報処理装置との間でデータをやり取りする。 The USB controller 224 exchanges data with any information processing device via a USB connection.

入力部226は、マウス、キーボード、タッチパネルなどで構成され、ユーザからの指示を受け付ける。表示部228は、ディスプレイ、各種インジケータなどで構成され、プロセッサ202からの処理結果などを出力する。 The input unit 226 is composed of a mouse, keyboard, touch panel, etc., and accepts instructions from the user. The display unit 228 is composed of a display, various indicators, etc., and outputs processing results from the processor 202, etc.

開発支援装置200は、光学ドライブ206を有していてもよい。光学ドライブ206は、コンピュータ読取可能なプログラムを非一過的に格納する記録媒体207(例えば、DVD(Digital Versatile Disc)などの光学記録媒体)からプログラムを読み取って、ストレージ210などに格納する。 The development support device 200 may have an optical drive 206. The optical drive 206 reads a program from a recording medium 207 (e.g., an optical recording medium such as a DVD (Digital Versatile Disc)) that non-transiently stores a computer-readable program, and stores the program in the storage 210 or the like.

開発支援装置200で実行される各種プログラムは、コンピュータ読取可能な記録媒体207を介してインストールされてもよいが、ネットワーク上の任意のサーバからダウンロードする形でインストールするようにしてもよい。 The various programs executed by the development support device 200 may be installed via a computer-readable recording medium 207, or may be installed by downloading them from any server on the network.

図3および図4には、1または複数のプロセッサがプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASIC(Application Specific Integrated Circuit)またはFPGA(Field-Programmable Gate Array)など)を用いて実装してもよい。 Figures 3 and 4 show configuration examples in which the required functions are provided by one or more processors executing a program, but some or all of these provided functions may be implemented using dedicated hardware circuits (e.g., an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array)).

開発支援装置200は、単一の情報処理装置として実現してもよいし、必要な機能の一部または全部を複数のプロセッサリソースを用いて実現してもよい。 The development support device 200 may be realized as a single information processing device, or some or all of the required functions may be realized using multiple processor resources.

<C.オンラインデバッグ>
次に、本実施の形態に係る開発支援装置200が提供するオンラインデバッグについて説明する。
C. Online Debugging
Next, the online debugging provided by the development support device 200 according to this embodiment will be described.

図5は、本実施の形態に係る開発支援装置200が提供するオンラインデバッグの一例を説明するための図である。図5を参照して、PLC100においては、ユーザプログラム114が実行されている。ユーザプログラム114は、POUとして、メインプログラム1142と、ファンクションブロック1146と、ファンクション1148とを含み得る。 Figure 5 is a diagram for explaining an example of online debugging provided by the development support device 200 according to the present embodiment. With reference to Figure 5, a user program 114 is executed in the PLC 100. The user program 114 may include a main program 1142, a function block 1146, and a function 1148 as POUs.

PLC100の実行環境は、データ保持部140を有している。データ保持部140は、典型的には、メインメモリ104が提供する。ユーザプログラム114は、データ保持部140に保持されているデータ(値)を参照して、記述された命令を実行するとともに、命令の実行により算出されたデータ(値)をデータ保持部140に格納する。 The execution environment of the PLC 100 has a data storage unit 140. The data storage unit 140 is typically provided by the main memory 104. The user program 114 references the data (values) stored in the data storage unit 140, executes the written instructions, and stores the data (values) calculated by executing the instructions in the data storage unit 140.

なお、ユーザプログラム114のソースコードにおいては、変数を用いて命令が記述されており、ソースコードから実行形式(あるいは、オブジェクト形式)のプログラムを生成する際に、各変数が格納されるアドレスなどが適宜割り当てられる。 In the source code of the user program 114, instructions are written using variables, and when an executable (or object) program is generated from the source code, addresses where each variable is stored are appropriately assigned.

開発支援装置200からのオンラインデバッグは、メインプログラム1142、ファンクションブロック1146およびファンクション1148のうち、いずれかに対する記述を変更する操作を含む。記述を変更することで、ユーザプログラム114の実行時の挙動および実行結果などを変化させることができる。 Online debugging from the development support device 200 includes an operation to change the description of any of the main program 1142, the function block 1146, and the function 1148. By changing the description, it is possible to change the behavior and execution results of the user program 114 during execution.

また、開発支援装置200からのオンラインデバッグは、データ保持部140に格納されているデータの値を変更する操作を含む。データ保持部140に格納されているデータの値を変更することで、ユーザプログラム114の実行や実行結果などを変化させることができる。 In addition, online debugging from the development support device 200 includes an operation to change the value of data stored in the data storage unit 140. By changing the value of data stored in the data storage unit 140, it is possible to change the execution and execution results of the user program 114.

このように、ユーザは、開発支援装置200を操作することで、PLC100で実行されるユーザプログラム114に対するデバッグを行うことができる。 In this way, the user can debug the user program 114 executed by the PLC 100 by operating the development support device 200.

<D.ファンクションブロックに対するデバッグ>
次に、ユーザプログラム114に含まれるファンクションブロックに対するデバッグについて説明する。
<D. Debugging Function Blocks>
Next, debugging of function blocks included in the user program 114 will be described.

ファンクションブロックは、入出力変数を有するブロックであり、メインプログラム1142から読み出されてインスタンス化されることで実行される。入出力変数としては、入力変数、出力変数、入出力変数、外部変数、グローバル変数などを含む。 A function block is a block that has input and output variables, and is executed by being read from the main program 1142 and instantiated. Input and output variables include input variables, output variables, input and output variables, external variables, global variables, etc.

入力変数は、ファンクションブロックに渡される値である。ファンクションブロックは、入力変数の値を変更できない。出力変数は、ファンクションブロックから出力される値である。ファンクションブロックは、出力変数の値を変更可能である。入出力変数は、入力変数および出力変数を併せたような変数である。ファンクションブロックは、入出力変数の値を変更できる。 An input variable is a value that is passed to a function block. A function block cannot change the value of an input variable. An output variable is a value that is output from a function block. A function block can change the value of an output variable. An input/output variable is a variable that combines an input variable and an output variable. A function block can change the value of an input/output variable.

本実施の形態に係る開発支援装置200は、ユーザ操作に応じて、PLC100で実行されるユーザプログラム114に含まれるファンクションブロックの入出力変数の値を変更できる。入出力変数は、入力変数とは異なり、ファンクションブロック自体が値を変更できるようになっている。そのため、開発支援装置200からの指令によって、ファンクションブロックの入出力変数の値を変更できるように、以下のような処理を採用する。 The development support device 200 according to this embodiment can change the values of input/output variables of function blocks included in the user program 114 executed by the PLC 100 in response to user operations. Unlike input variables, the values of input/output variables can be changed by the function block itself. Therefore, the following process is adopted so that the values of the input/output variables of the function block can be changed by commands from the development support device 200.

(d1:参照渡し)
まず、ファンクションブロックに入出力変数を参照渡しする場合の構成例について説明する。
(d1: pass by reference)
First, a configuration example in which an input/output variable is passed to a function block by reference will be described.

図6は、本実施の形態に係る開発支援装置200が提供するファンクションブロックに対するデバッグの一例を説明するための図である。図6を参照して、PLC100でユーザプログラム114が実行されることで、インスタンス化されたファンクションブロック150が生成される。 Figure 6 is a diagram for explaining an example of debugging a function block provided by the development support device 200 according to this embodiment. Referring to Figure 6, an instantiated function block 150 is generated by executing the user program 114 in the PLC 100.

ファンクションブロック150には、入力変数152および入出力変数156が入力値として与えられる。また、ファンクションブロック150からは、実行結果として、入出力変数156および出力変数160が出力される。 The function block 150 is provided with input variables 152 and input/output variables 156 as input values. In addition, the function block 150 outputs input/output variables 156 and output variables 160 as execution results.

入力変数152は、値渡しであり、入力変数152に設定された値(実引数)がファンクションブロック150の入力内部パラメータ154にコピーされる。出力変数160についても値渡しであり、ファンクションブロック150の実行により算出された出力内部パラメータ162の値が出力変数160にコピーされる。 The input variable 152 is passed by value, and the value (actual argument) set in the input variable 152 is copied to the input internal parameter 154 of the function block 150. The output variable 160 is also passed by value, and the value of the output internal parameter 162 calculated by executing the function block 150 is copied to the output variable 160.

これに対して、入出力変数156は、参照渡しであり、入出力変数156に設定されたアドレス(仮引数)が入出力内部パラメータ158にコピーされる。入出力内部パラメータ158には、指定されたアドレス(図6に示す例では、アドレスA)により特定されたデータ保持部140上の値が参照される。また、ファンクションブロック150の実行により入出力内部パラメータ158の値が変更されると、変更後の入出力内部パラメータ158の値は、データ保持部140上の指定されたアドレス(図6に示す例では、アドレスA)に書き込まれる。 In contrast, input/output variables 156 are passed by reference, and the address (dummy argument) set in input/output variable 156 is copied to input/output internal parameter 158. The input/output internal parameter 158 references a value in data storage unit 140 identified by a specified address (address A in the example shown in FIG. 6). Furthermore, when the value of input/output internal parameter 158 is changed by execution of function block 150, the changed value of input/output internal parameter 158 is written to the specified address in data storage unit 140 (address A in the example shown in FIG. 6).

すなわち、入力変数152のように値渡しで値が入力される場合には、開発支援装置200から入力変数152の値をそのまま変更すればよい。一方、入出力変数156のように参照渡しで値が入力される場合には、入出力変数156の値(すなわち、アドレス)ではなく、入出力変数156の値(アドレス)によって特定される値を変更する必要がある。 In other words, when a value is input by value, such as input variable 152, the value of input variable 152 can be changed directly from the development support device 200. On the other hand, when a value is input by reference, such as input/output variable 156, it is necessary to change the value specified by the value (address) of input/output variable 156, rather than the value (i.e., address) of input/output variable 156.

そこで、本実施の形態に係る制御システム1は、ファンクションブロック150の過去の実行状態を参照することで、ファンクションブロック150の入出力変数156に設定された値(アドレス)を取得するアドレス特定モジュール170を有している。 Therefore, the control system 1 according to this embodiment has an address identification module 170 that obtains the value (address) set in the input/output variable 156 of the function block 150 by referring to the past execution state of the function block 150.

アドレス特定モジュール170は、ファンクションブロック150に関連付けられた入出力変数156の値の変更が指示されると、ファンクションブロック150の過去の実行状態を参照することで、入出力変数156に対応付けられたデータ保持部140のアドレスを特定する。より具体的には、アドレス特定モジュール170は、ファンクションブロック150の前回実行時の情報を収集することで、入出力変数156に設定されたアドレス(仮引数)を特定するアドレス特定モジュール170を有している。 When an instruction to change the value of the input/output variable 156 associated with the function block 150 is received, the address determination module 170 determines the address of the data storage unit 140 associated with the input/output variable 156 by referring to the past execution state of the function block 150. More specifically, the address determination module 170 has an address determination module 170 that determines the address (dummy argument) set in the input/output variable 156 by collecting information from the previous execution of the function block 150.

そして、開発支援装置200から入出力変数156の値を変更する指示を受けると、PLC100は、アドレス特定モジュール170により特定されたアドレスにより指定されたデータ保持部140上の値を変更する。すなわち、PLC100は、データ保持部140の特定されたアドレスに保持されている値を指示された値に変更する。 Then, when the PLC 100 receives an instruction from the development support device 200 to change the value of the input/output variable 156, the PLC 100 changes the value in the data storage unit 140 specified by the address identified by the address identification module 170. In other words, the PLC 100 changes the value stored in the identified address in the data storage unit 140 to the specified value.

図7は、図6に示すオンラインデバッグに係る処理手順を示すフローチャートである。図7に示す各ステップは、典型的には、PLC100のプロセッサ102がシステムプログラム112を実行することで実現される。 Figure 7 is a flowchart showing the processing procedure for the online debugging shown in Figure 6. Each step shown in Figure 7 is typically realized by the processor 102 of the PLC 100 executing the system program 112.

図7を参照して、PLC100は、ユーザプログラム114が参照するデータの値を変更するための指示を受け付ける。より具体的には、PLC100は、開発支援装置200からファンクションブロック150に含まれる入出力変数156の値の変更指示を受けたか否かを判断する(ステップS100)。ファンクションブロック150の入出力変数156の値の変更指示を受けていなければ(ステップS100においてNO)、ステップS100の処理が繰り返される。 Referring to FIG. 7, the PLC 100 receives an instruction to change the value of data referenced by the user program 114. More specifically, the PLC 100 determines whether or not an instruction to change the value of the input/output variable 156 included in the function block 150 has been received from the development support device 200 (step S100). If an instruction to change the value of the input/output variable 156 of the function block 150 has not been received (NO in step S100), the process of step S100 is repeated.

ファンクションブロック150の入出力変数156の値の変更指示を受ければ(ステップS100においてYES)、PLC100は、現在実行中のユーザプログラム114の実行完了を待つ(ステップS102)。そして、PLC100は、実行完了したユーザプログラム114の実行状態を参照することで、対象のファンクションブロック150の入出力変数156に設定されたアドレスを特定する(ステップS104)。すなわち、PLC100は、ユーザプログラム114が実行完了している状態において、アドレスを特定する。 When an instruction to change the value of the input/output variable 156 of the function block 150 is received (YES in step S100), the PLC 100 waits for the currently executing user program 114 to finish executing (step S102). The PLC 100 then identifies the address set in the input/output variable 156 of the target function block 150 by referencing the execution state of the user program 114 that has finished executing (step S104). In other words, the PLC 100 identifies the address when the user program 114 has finished executing.

このように、PLC100は、ファンクションブロックに関連付けられた入出力変数156の値の変更が指示されると、当該ファンクションブロックの過去の実行状態を参照することで、入出力変数156に対応付けられたアドレスを特定する。 In this way, when the PLC 100 is instructed to change the value of the input/output variable 156 associated with a function block, it identifies the address associated with the input/output variable 156 by referencing the past execution state of the function block.

さらに、PLC100は、特定されたアドレスにより指定されたデータ保持部140上の値を指示された値に変更する(ステップS106)。このように、PLC100は、特定されたアドレスに保持されている値を指示された値に変更する。すると、次の実行周期が到来すると、ユーザプログラム114が再度実行される。 Furthermore, the PLC 100 changes the value in the data storage unit 140 specified by the identified address to the specified value (step S106). In this way, the PLC 100 changes the value stored in the identified address to the specified value. Then, when the next execution cycle arrives, the user program 114 is executed again.

以上のような処理手順によって、ファンクションブロック150を含むユーザプログラム114をデバッグする処理の実行が完了する。 The above processing steps complete the process of debugging the user program 114 that includes the function block 150.

このように、本実施の形態に係る制御システム1は、ファンクションブロック150の入出力変数156に任意の値を書き込み場合には、ファンクションブロック150が前回実行された際に指定されたアドレス(仮引数)を特定して、当該特定されたアドレスに対応する領域に当該任意の値を書き込む。これによって、参照渡しの形で実装されたファンクションブロックの入出力変数を任意に値に変更することができる。 In this way, when writing an arbitrary value to the input/output variable 156 of the function block 150, the control system 1 according to this embodiment identifies the address (dummy argument) specified when the function block 150 was last executed, and writes the arbitrary value to the area corresponding to the identified address. This makes it possible to arbitrarily change the value of the input/output variable of the function block implemented in the pass-by-reference format.

上述の説明においては、アドレス特定モジュール170がPLC100に実装される形態について説明した。但し、開発支援装置200がアドレス特定モジュール170に相当する機能を有していてもよい。すなわち、アドレス特定モジュール170は、開発支援装置200に実装されてもよい。この場合には、開発支援装置200がPLC100からファンクションブロック150の前回実行時の情報を収集することで、入出力変数156に設定されたアドレス(仮引数)を特定する。 In the above description, the address identification module 170 is implemented in the PLC 100. However, the development support device 200 may have a function equivalent to the address identification module 170. In other words, the address identification module 170 may be implemented in the development support device 200. In this case, the development support device 200 collects information from the PLC 100 about the previous execution of the function block 150, thereby identifying the address (dummy argument) set in the input/output variable 156.

さらに、特定されたアドレスにより指定されたデータ保持部140上の値の変更についても、PLC100が実行主体になってもよいし、開発支援装置200が実行主体になってもよい。 Furthermore, the PLC 100 or the development support device 200 may be the executing entity for changing the value in the data storage unit 140 specified by the identified address.

(d2:値渡し)
まず、ファンクションブロックに入出力変数を値渡しする場合の構成例について説明する。
(d2: pass by value)
First, a configuration example in which input/output variables are passed to a function block by value will be described.

図8は、本実施の形態に係る開発支援装置200が提供するファンクションブロックに対するデバッグの別の一例を説明するための図である。図8を参照して、PLC100でユーザプログラム114が実行されることで、インスタンス化されたファンクションブロック150が生成される。 Figure 8 is a diagram for explaining another example of debugging a function block provided by the development support device 200 according to this embodiment. Referring to Figure 8, an instantiated function block 150 is generated by executing the user program 114 in the PLC 100.

ファンクションブロック150には、入力変数152および入出力変数156が入力値として与えられる。また、ファンクションブロック150からは、実行結果として、入出力変数156および出力変数160が出力される。 The function block 150 is provided with input variables 152 and input/output variables 156 as input values. In addition, the function block 150 outputs input/output variables 156 and output variables 160 as execution results.

入力変数152は、値渡しであり、入力変数152に設定された値(実引数)がファンクションブロック150の入力内部パラメータ154にコピーされる。出力変数160についても値渡しであり、ファンクションブロック150の実行により算出された出力内部パラメータ162の値が出力変数160にコピーされる。 The input variable 152 is passed by value, and the value (actual argument) set in the input variable 152 is copied to the input internal parameter 154 of the function block 150. The output variable 160 is also passed by value, and the value of the output internal parameter 162 calculated by executing the function block 150 is copied to the output variable 160.

入出力変数156についても参照渡しである。入出力変数156の値は、ファンクションブロック150の外部から変更されるとともに、ファンクションブロック150自身が変更する。そのため、ファンクションブロック150は、入出力変数156を入力変数として受け付けるための入出力内部パラメータ158Aと、入出力変数156を出力変数として出力するための入出力内部パラメータ158Bとを有している。 The input/output variable 156 is also passed by reference. The value of the input/output variable 156 can be changed from outside the function block 150, and can also be changed by the function block 150 itself. Therefore, the function block 150 has an input/output internal parameter 158A for accepting the input/output variable 156 as an input variable, and an input/output internal parameter 158B for outputting the input/output variable 156 as an output variable.

入出力変数156に設定された値(実値)がファンクションブロック150の入出力内部パラメータ158Aにコピーされる。ファンクションブロック150は、入出力内部パラメータ158Aの値を参照して演算を実行し、実行結果を入出力内部パラメータ158Bに反映する。さらに、入出力内部パラメータ158Bの値が入出力変数156にコピーされる。 The value (actual value) set in the input/output variable 156 is copied to the input/output internal parameter 158A of the function block 150. The function block 150 executes a calculation by referring to the value of the input/output internal parameter 158A, and reflects the execution result in the input/output internal parameter 158B. Furthermore, the value of the input/output internal parameter 158B is copied to the input/output variable 156.

ファンクションブロック150が入出力変数156の値を変更するため、入出力変数156の値が変更対象に設定されていない環境もある。このような場合には、開発支援装置200からファンクションブロック150の入出力内部パラメータ158Aの値を変更することになる。しかしながら、ファンクションブロック150が実行されるたびに、入出力内部パラメータ158Aには入出力変数156に設定された値がコピーされることになる。そのため、入出力内部パラメータ158Aを実質的に変更することにはならない。 Because the function block 150 changes the value of the input/output variable 156, there are environments in which the value of the input/output variable 156 is not set as the object of change. In such cases, the value of the input/output internal parameter 158A of the function block 150 is changed from the development support device 200. However, each time the function block 150 is executed, the value set in the input/output variable 156 is copied to the input/output internal parameter 158A. Therefore, the input/output internal parameter 158A is not actually changed.

そのため、本実施の形態に係る制御システム1は、入出力内部パラメータ158Aの値を変更する指示に応答して、ファンクションブロック150に渡される入出力変数156の値を変更する処理を実行する。 Therefore, the control system 1 according to this embodiment executes a process to change the value of the input/output variable 156 passed to the function block 150 in response to an instruction to change the value of the input/output internal parameter 158A.

より具体的には、ユーザから入出力内部パラメータ158Aの値を変更する指示が与えられると(ステップS2)、メインプログラム1142に記述されたファンクションブロック150を呼び出すためのコールツリーを参照することで、対応する入出力変数156を特定する(ステップS4)。そして、制御システム1は、特定された入出力変数156の値を指示された値に変更する(ステップS6)。 More specifically, when a user gives an instruction to change the value of the input/output internal parameter 158A (step S2), the control system 1 identifies the corresponding input/output variable 156 by referencing the call tree for calling the function block 150 described in the main program 1142 (step S4). Then, the control system 1 changes the value of the identified input/output variable 156 to the instructed value (step S6).

このように、制御システム1は、ファンクションブロック150の入出力内部パラメータ158Aへ値を書き込む処理をファンクションブロック150の入出力内部パラメータ158Aにリダイレクトする。 In this way, the control system 1 redirects the process of writing a value to the input/output internal parameter 158A of the function block 150 to the input/output internal parameter 158A of the function block 150.

なお、ステップS4の処理は、PLC100および開発支援装置200のいずれが実行するようにしてもよい。 The processing of step S4 may be performed by either the PLC 100 or the development support device 200.

図9は、図8に示すオンラインデバッグに係る処理手順を示すフローチャートである。図9に示す各ステップは、典型的には、PLC100のプロセッサ102がシステムプログラム112を実行することで実現される。 Figure 9 is a flowchart showing the processing procedure for the online debugging shown in Figure 8. Each step shown in Figure 9 is typically realized by the processor 102 of the PLC 100 executing the system program 112.

図9を参照して、PLC100は、開発支援装置200からファンクションブロック150の入出力内部パラメータ158Aの値の変更指示を受けたか否かを判断する(ステップS200)。ファンクションブロック150の入出力内部パラメータ158Aの値の変更指示を受けていなければ(ステップS200においてNO)、ステップS200の処理が繰り返される。 Referring to FIG. 9, the PLC 100 determines whether or not it has received an instruction from the development support device 200 to change the value of the input/output internal parameter 158A of the function block 150 (step S200). If it has not received an instruction to change the value of the input/output internal parameter 158A of the function block 150 (NO in step S200), the process of step S200 is repeated.

ファンクションブロック150の入出力内部パラメータ158Aの値の変更指示を受ければ(ステップS200においてYES)、PLC100は、現在実行中のユーザプログラム114の実行完了を待つ(ステップS202)。 If an instruction to change the value of the input/output internal parameter 158A of the function block 150 is received (YES in step S200), the PLC 100 waits for the currently executing user program 114 to complete execution (step S202).

PLC100は、メインプログラム1142に記述されたファンクションブロック150を呼び出すためのコールツリーを参照することで、対象の入出力内部パラメータ158Aに対応する入出力変数156を特定する(ステップS204)。さらに、PLC100は、特定された入出力変数156の値を指示された値に変更する(ステップS206)。すると、次の実行周期が到来すると、ユーザプログラム114が再度実行される。 The PLC 100 identifies the input/output variable 156 that corresponds to the target input/output internal parameter 158A by referencing the call tree for calling the function block 150 described in the main program 1142 (step S204). Furthermore, the PLC 100 changes the value of the identified input/output variable 156 to the specified value (step S206). Then, when the next execution cycle arrives, the user program 114 is executed again.

このように、本実施の形態に係る制御システム1は、ファンクションブロック150の入出力内部パラメータ158Aに任意の値を書き込み場合には、ファンクションブロック150を呼び出すためのコールツリーを参照することで、対象の入出力内部パラメータ158Aに対応する入出力変数156を特定し、当該特定した入出力変数156に当該任意の値を書き込む。これによって、値渡しの形で実装されたファンクションブロックの入出力変数を任意に値に変更することができる。 In this way, when writing an arbitrary value to an input/output internal parameter 158A of a function block 150, the control system 1 according to this embodiment refers to the call tree for calling the function block 150, identifies the input/output variable 156 that corresponds to the target input/output internal parameter 158A, and writes the arbitrary value to the identified input/output variable 156. This makes it possible to arbitrarily change the value of the input/output variable of a function block that is implemented in the form of pass-by-value.

上述したように、入出力内部パラメータ158Aに対応する入出力変数156を特定する処理は、PLC100および開発支援装置200のいずれに実装されてもよい。 As described above, the process of identifying the input/output variable 156 corresponding to the input/output internal parameter 158A may be implemented in either the PLC 100 or the development support device 200.

さらに、特定されたアドレスにより指定されたデータ保持部140上の値の変更についても、PLC100が実行主体になってもよいし、開発支援装置200が実行主体になってもよい。 Furthermore, the PLC 100 or the development support device 200 may be the executing entity for changing the value in the data storage unit 140 specified by the identified address.

<E.ユーザインターフェイス>
次に、開発支援装置200が提供するオンラインデバッグに係るユーザインターフェイス画面の一例について説明する。
E. User Interface
Next, an example of a user interface screen related to online debugging provided by the development support device 200 will be described.

図10は、本実施の形態に係る開発支援装置200が提供するオンラインデバッグに係るユーザインターフェイス画面の一例を示す模式図である。図10を参照して、開発支援装置200が提供するユーザインターフェイス画面250は、変更対象の変数を示す対象変数欄252と、対象の変数の現在値を示す現在値欄254と、対象の変数の変更を希望する値を示す変更指示値欄256とを含む。 Figure 10 is a schematic diagram showing an example of a user interface screen related to online debugging provided by the development support device 200 according to this embodiment. Referring to Figure 10, the user interface screen 250 provided by the development support device 200 includes a target variable column 252 indicating the variable to be changed, a current value column 254 indicating the current value of the target variable, and a change instruction value column 256 indicating the value to which the target variable is desired to be changed.

ユーザは、対象変数欄252で任意の変数を選択あるいは登録するとともに、現在値欄254に表示される現在値を参照して、希望する新たな値を変更指示値欄256に入力する。すると、開発支援装置200からPLC100に対して、対象変数欄252に選択された変数の値を変更指示値欄256に入力された値に変更する旨の指示が与えられる。 The user selects or registers an arbitrary variable in the target variable column 252, and inputs a desired new value into the change instruction value column 256, referring to the current value displayed in the current value column 254. The development support device 200 then instructs the PLC 100 to change the value of the variable selected in the target variable column 252 to the value input into the change instruction value column 256.

このように、開発支援装置200は、ユーザ操作に応じて、PLC100が実行するユーザプログラム114が参照するデータの値を変更するための指示を発行する指示発行部を有している。 In this way, the development support device 200 has an instruction issuing unit that issues an instruction to change the value of data referenced by the user program 114 executed by the PLC 100 in response to user operations.

ユーザは、図10に示すようなユーザインターフェイス画面を利用して、PLC100で実行されるユーザプログラム114に対するオンラインデバッグを行うことができる。 The user can use a user interface screen such as that shown in FIG. 10 to perform online debugging of the user program 114 executed by the PLC 100.

<F.付記>
上述したような本実施の形態は、以下のような技術思想を含む。
[構成1]
ファンクションブロック(150)を含むユーザプログラム(114)を実行する演算処理部(50:102)と、
前記ユーザプログラムが参照するデータを保持するデータ保持部(140:104)と、
ユーザ操作に応じて、前記演算処理部が実行するユーザプログラムが参照するデータの値を変更するための指示を発行する指示発行部(260:200)と、
前記ファンクションブロックに関連付けられた入出力変数の値の変更が指示されると、当該ファンクションブロックの過去の実行状態を参照することで、前記入出力変数に対応付けられた前記データ保持部のアドレスを特定するアドレス特定部(170)と、
前記データ保持部の前記特定されたアドレスに保持されている値を指示された値に変更する変更部(180)とを備える、制御システム。
[構成2]
前記アドレス特定部は、前記ファンクションブロックの前回実行時の情報を収集することで、前記アドレスを特定する、構成1に記載の制御システム。
[構成3]
前記アドレス特定部は、前記ユーザプログラムが実行完了している状態において、前記アドレスを特定する、構成1または2に記載の制御システム。
[構成4]
前記制御システムは、プログラマブルロジックコントローラ(100)と、開発支援装置(200)とを含み、
前記アドレス特定部は、前記プログラマブルロジックコントローラに実装される、構成1~3のいずれか1項に記載の制御システム。
[構成5]
前記制御システムは、プログラマブルロジックコントローラ(100)と、開発支援装置(200)とを含み、
前記アドレス特定部は、前記開発支援装置に実装される、構成1~3のいずれか1項に記載の制御システム。
[構成6]
ファンクションブロック(150)を含むユーザプログラム(114)を実行する実行環境を提供するシステムプログラム(112)であって、コンピュータ(100)に、
前記ユーザプログラムが参照するデータの値を変更するための指示を受け付けるステップ(S100)と、
前記ファンクションブロックに関連付けられた入出力変数の値の変更が指示されると、当該ファンクションブロックの過去の実行状態を参照することで、前記入出力変数に対応付けられたアドレスを特定するステップ(S102,S104)と、
前記特定されたアドレスに保持されている値を指示された値に変更するステップ(S106)とを実行させる、システムプログラム。
[構成7]
ファンクションブロック(150)を含むユーザプログラム(114)をデバッグするデバッグ方法であって、
前記ユーザプログラムが参照するデータの値を変更するための指示を受け付けるステップ(S100)と、
前記ファンクションブロックに関連付けられた入出力変数の値の変更が指示されると、当該ファンクションブロックの過去の実行状態を参照することで、前記入出力変数に対応付けられたアドレスを特定するステップ(S102,S104)と、
前記特定されたアドレスに保持されている値を指示された値に変更するステップ(S106)とを備える、デバッグ方法。
<F. Notes>
The present embodiment as described above includes the following technical idea.
[Configuration 1]
A processing unit (50:102) that executes a user program (114) including a function block (150);
A data storage unit (140:104) for storing data referenced by the user program;
an instruction issuing unit (260:200) that issues an instruction to change a value of data referenced by a user program executed by the arithmetic processing unit in response to a user operation;
an address specification unit (170) that specifies an address of the data storage unit associated with the input/output variable by referring to a past execution state of the function block when a change in the value of the input/output variable associated with the function block is instructed;
and a change unit (180) that changes the value stored in the specified address of the data storage unit to a specified value.
[Configuration 2]
2. The control system according to claim 1, wherein the address identification unit identifies the address by collecting information from a previous execution of the function block.
[Configuration 3]
3. The control system according to claim 1, wherein the address specification unit specifies the address when the execution of the user program has been completed.
[Configuration 4]
The control system includes a programmable logic controller (100) and a development support device (200);
The control system according to any one of configurations 1 to 3, wherein the address specification unit is implemented in the programmable logic controller.
[Configuration 5]
The control system includes a programmable logic controller (100) and a development support device (200);
The control system according to any one of configurations 1 to 3, wherein the address specification unit is implemented in the development support device.
[Configuration 6]
A system program (112) that provides an execution environment for executing a user program (114) including a function block (150), the system program (112) being provided to a computer (100):
A step (S100) of receiving an instruction to change a value of data referenced by the user program;
When a change in the value of an input/output variable associated with the function block is instructed, a step of identifying an address associated with the input/output variable by referring to a past execution state of the function block (S102, S104);
and changing the value held at the specified address to a specified value (S106).
[Configuration 7]
A method for debugging a user program (114) including a function block (150), comprising the steps of:
A step (S100) of receiving an instruction to change a value of data referenced by the user program;
When a change in the value of an input/output variable associated with the function block is instructed, a step of identifying an address associated with the input/output variable by referring to a past execution state of the function block (S102, S104);
and changing the value held at the specified address to a specified value (S106).

<G.利点>
本実施の形態に係る制御システムは、ファンクションブロックの過去の実行状態を参照することで、入出力変数に対応付けられたデータ保持部のアドレスを特定するので、入出力変数に実値が格納されていなくても、入出力変数が示す値を変更できる。入出力変数を任意の値に変更する手段を提供することで、ファンクションブロックを含むユーザプログラムをより効率的にデバッグできる。
G. Advantages
The control system according to the present embodiment identifies the address of a data storage unit associated with an input/output variable by referring to the past execution state of the function block, so that the value indicated by the input/output variable can be changed even if an actual value is not stored in the input/output variable. By providing a means for changing the input/output variable to an arbitrary value, user programs including function blocks can be debugged more efficiently.

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

1 制御システム、10 フィールドネットワーク、12 デバイス、14 フィールドデバイス、16 上位ネットワーク、20 ロボットコントローラ、22 ロボット、30 モータドライバ、32 モータ、50 演算処理部、100 PLC、102,202 プロセッサ、104,204 メインメモリ、106 上位ネットワークコントローラ、108 フィールドネットワークコントローラ、110,210 ストレージ、112 システムプログラム、114 ユーザプログラム、116 ローカルバスコントローラ、118 プロセッサバス、120 メモリカードインターフェイス、122 メモリカード、124,224 USBコントローラ、126 ローカルバス、130 機能ユニット、140 データ保持部、150,1146 ファンクションブロック、152 入力変数、154 入力内部パラメータ、156 入出力変数、158,158A,158B 入出力内部パラメータ、160 出力変数、162 出力内部パラメータ、170 アドレス特定モジュール、180 変更モジュール、200 開発支援装置、206 光学ドライブ、207 記録媒体、208 バス、212 OS、214 開発プログラム、220 ネットワークコントローラ、226 入力部、228 表示部、250 ユーザインターフェイス画面、252 対象変数欄、254 現在値欄、256 変更指示値欄、260 指示発行部、300 HMI、400 サーバ装置、1142 メインプログラム、1148 ファンクション。 1 Control system, 10 Field network, 12 Device, 14 Field device, 16 Upper network, 20 Robot controller, 22 Robot, 30 Motor driver, 32 Motor, 50 Arithmetic processing unit, 100 PLC, 102, 202 Processor, 104, 204 Main memory, 106 Upper network controller, 108 Field network controller, 110, 210 Storage, 112 System program, 114 User program, 116 Local bus controller, 118 Processor bus, 120 Memory card interface, 122 Memory card, 124, 224 USB controller, 126 Local bus, 130 Functional unit, 140 Data storage unit, 150, 1146 Function block, 152 Input variable, 154 Input internal parameter, 156 Input/output variable, 158, 158A, 158B Input/output internal parameter, 160 Output variable, 162 Output internal parameters, 170 Address identification module, 180 Change module, 200 Development support device, 206 Optical drive, 207 Recording medium, 208 Bus, 212 OS, 214 Development program, 220 Network controller, 226 Input section, 228 Display section, 250 User interface screen, 252 Target variable column, 254 Current value column, 256 Change instruction value column, 260 Instruction issuing section, 300 HMI, 400 Server device, 1142 Main program, 1148 Function.

Claims (7)

ファンクションブロックを含むユーザプログラムを実行する演算処理部と、
前記ユーザプログラムが参照するデータを保持するデータ保持部と、
ユーザ操作に応じて、前記演算処理部が実行するユーザプログラムが参照するデータの値を変更するための指示を発行する指示発行部と、
前記ファンクションブロックに関連付けられた入出力変数の値の変更が指示されると、当該ファンクションブロックの過去の実行状態を参照することで、前記入出力変数に対応付けられた前記データ保持部のアドレスを特定するアドレス特定部と、
前記データ保持部の前記特定されたアドレスに保持されている値を指示された値に変更する変更部とを備える、制御システム。
a processing unit that executes a user program including a function block;
a data storage unit for storing data referenced by the user program;
an instruction issuing unit that issues an instruction to change a value of data referenced by a user program executed by the arithmetic processing unit in response to a user operation;
an address specification unit that specifies an address of the data storage unit associated with the input/output variable by referring to a past execution state of the function block when a change in a value of the input/output variable associated with the function block is instructed;
a change unit that changes the value held in the specified address of the data holding unit to a specified value.
前記アドレス特定部は、前記ファンクションブロックの前回実行時の情報を収集することで、前記アドレスを特定する、請求項1に記載の制御システム。 The control system of claim 1, wherein the address identification unit identifies the address by collecting information from the previous execution of the function block. 前記アドレス特定部は、前記ユーザプログラムが実行完了している状態において、前記アドレスを特定する、請求項1または2に記載の制御システム。 The control system according to claim 1 or 2, wherein the address identification unit identifies the address when the execution of the user program is complete. 前記制御システムは、プログラマブルロジックコントローラと、開発支援装置とを含み、
前記アドレス特定部は、前記プログラマブルロジックコントローラに実装される、請求項1~3のいずれか1項に記載の制御システム。
The control system includes a programmable logic controller and a development support device.
4. The control system according to claim 1, wherein the address specification unit is implemented in the programmable logic controller.
前記制御システムは、プログラマブルロジックコントローラと、開発支援装置とを含み、
前記アドレス特定部は、前記開発支援装置に実装される、請求項1~3のいずれか1項に記載の制御システム。
The control system includes a programmable logic controller and a development support device.
4. The control system according to claim 1, wherein the address specification unit is implemented in the development support device.
ファンクションブロックを含むユーザプログラムを実行する実行環境を提供するシステムプログラムであって、コンピュータに、
前記ユーザプログラムが参照するデータの値を変更するための指示を受け付けるステップと、
前記ファンクションブロックに関連付けられた入出力変数の値の変更が指示されると、当該ファンクションブロックの過去の実行状態を参照することで、前記入出力変数に対応付けられたアドレスを特定するステップと、
前記特定されたアドレスに保持されている値を指示された値に変更するステップとを実行させる、システムプログラム。
A system program for providing an execution environment for executing a user program including a function block, the system program comprising:
receiving an instruction to change a value of data referenced by the user program;
when a change in a value of an input/output variable associated with the function block is instructed, identifying an address associated with the input/output variable by referring to a past execution state of the function block;
and changing the value held at the specified address to a specified value.
ファンクションブロックを含むユーザプログラムをデバッグするデバッグ方法であって、
前記ユーザプログラムが参照するデータの値を変更するための指示を受け付けるステップと、
前記ファンクションブロックに関連付けられた入出力変数の値の変更が指示されると、当該ファンクションブロックの過去の実行状態を参照することで、前記入出力変数に対応付けられたアドレスを特定するステップと、
前記特定されたアドレスに保持されている値を指示された値に変更するステップとを備える、デバッグ方法。
A debugging method for debugging a user program including a function block, comprising the steps of:
receiving an instruction to change a value of data referenced by the user program;
when a change in a value of an input/output variable associated with the function block is instructed, identifying an address associated with the input/output variable by referring to a past execution state of the function block;
and changing the value held at the specified address to a designated value.
JP2021089544A 2021-05-27 2021-05-27 CONTROL SYSTEM, SYSTEM PROGRAM, AND DEBUG METHOD Active JP7589645B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021089544A JP7589645B2 (en) 2021-05-27 2021-05-27 CONTROL SYSTEM, SYSTEM PROGRAM, AND DEBUG METHOD
PCT/JP2022/014417 WO2022249713A1 (en) 2021-05-27 2022-03-25 Control system, system program, and debugging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021089544A JP7589645B2 (en) 2021-05-27 2021-05-27 CONTROL SYSTEM, SYSTEM PROGRAM, AND DEBUG METHOD

Publications (2)

Publication Number Publication Date
JP2022182160A JP2022182160A (en) 2022-12-08
JP7589645B2 true JP7589645B2 (en) 2024-11-26

Family

ID=84228675

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021089544A Active JP7589645B2 (en) 2021-05-27 2021-05-27 CONTROL SYSTEM, SYSTEM PROGRAM, AND DEBUG METHOD

Country Status (2)

Country Link
JP (1) JP7589645B2 (en)
WO (1) WO2022249713A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001209412A (en) 2000-01-25 2001-08-03 Omron Corp Sequence program simulation device
JP2010529561A (en) 2007-06-04 2010-08-26 グラコ ミネソタ インコーポレーテッド Distributed monitoring and fluid treatment control system
JP2016045712A (en) 2014-08-22 2016-04-04 株式会社日立産機システム Programmable logic controller

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4973867B2 (en) * 2007-10-19 2012-07-11 オムロン株式会社 PLC control program development device and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001209412A (en) 2000-01-25 2001-08-03 Omron Corp Sequence program simulation device
JP2010529561A (en) 2007-06-04 2010-08-26 グラコ ミネソタ インコーポレーテッド Distributed monitoring and fluid treatment control system
JP2016045712A (en) 2014-08-22 2016-04-04 株式会社日立産機システム Programmable logic controller

Also Published As

Publication number Publication date
WO2022249713A1 (en) 2022-12-01
JP2022182160A (en) 2022-12-08

Similar Documents

Publication Publication Date Title
JP7247808B2 (en) Control system, analysis method and program
JP2019061467A (en) Support system and support program
JP7077848B2 (en) Control device
WO2020179581A1 (en) Control device and software deployment method
CN110968051B (en) Method and engineering system for planning an automation system
JP7589645B2 (en) CONTROL SYSTEM, SYSTEM PROGRAM, AND DEBUG METHOD
WO2020246097A1 (en) Support device and support program
CN110119119A (en) Generate method, apparatus, the computer readable storage medium of application program
EP3792710B1 (en) Control system, support device, and support program
JP7404748B2 (en) Program development device and program for realizing the program development device
WO2019207679A1 (en) Monitoring assistance device, programmable logic controller, monitoring assistance method, and monitoring assistance program
JP7167516B2 (en) Control device, control method and control program
JP2024161772A (en) Programmable logic controller, support device, and display device, as well as logging method, support method, and display method
CN108027602B (en) Simulation method for simulating a real controller of an industrial process, facility or machine and simulation system for performing the simulation method
JP7419956B2 (en) Information processing device, information processing method and program
JP7375632B2 (en) Control system and support equipment
JP3764436B2 (en) Machine control device
JP2002073120A (en) Programming apparatus and method for programmable controller
JP7241982B1 (en) Image generation program, image generation device, programmable controller system and image generation method
JP7676961B2 (en) Information processing device, control system, and program for developing control program
JP7855155B1 (en) Control program generation program, control program generation device, and control program generation method
EP4636515A1 (en) Development assistance device, development assistance method, and development assistance program
JP2023151876A (en) Control device, control method, development support device, and program
van der Linden et al. Towards evolvable state machines for automation systems
JPH07253876A (en) Program creation device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240315

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20241028

R150 Certificate of patent or registration of utility model

Ref document number: 7589645

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150