JP2022053177A - Sequence program editing device, sequence program editing method, and computer readable storage medium - Google Patents

Sequence program editing device, sequence program editing method, and computer readable storage medium Download PDF

Info

Publication number
JP2022053177A
JP2022053177A JP2020159845A JP2020159845A JP2022053177A JP 2022053177 A JP2022053177 A JP 2022053177A JP 2020159845 A JP2020159845 A JP 2020159845A JP 2020159845 A JP2020159845 A JP 2020159845A JP 2022053177 A JP2022053177 A JP 2022053177A
Authority
JP
Japan
Prior art keywords
data address
sequence program
program
sequence
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2020159845A
Other languages
Japanese (ja)
Inventor
直 小野瀬
Nao ONOSE
祐樹 池田
Yuki Ikeda
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.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP2020159845A priority Critical patent/JP2022053177A/en
Publication of JP2022053177A publication Critical patent/JP2022053177A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

To provide a device that simplifies program editing in creating a sequence program.SOLUTION: A sequence program generation unit 15 assesses a type of a data address "Y0000" for which an indication for automatic program creation has been accepted from a programmer, and assesses that the same is an output data address as a beginning alphabet is "Y." Since size of the "Y0000" is one byte, eight (8-bit) output coils are created in each line of a ladder program.SELECTED DRAWING: Figure 3

Description

本発明は、シーケンスプログラム編集装置、シーケンスプログラム編集方法、コンピュータが読み取り可能な記憶媒体に関する。 The present invention relates to a sequence program editing device, a sequence program editing method, and a computer-readable storage medium.

シーケンス制御は、制御方法の1つであり、同じ動作を繰り返し実行する工場のラインなどで広く用いられている。PLC(Programmable Logic Controller)は、シーケンス制御専用のコントローラであり、プログラマブルコントローラ(PC)、シーケンサまたはシーケンスコントローラともよばれる。 Sequence control is one of the control methods and is widely used in factories and the like where the same operation is repeatedly executed. A PLC (Programmable Logic Controller) is a controller dedicated to sequence control, and is also called a programmable controller (PC), a sequencer, or a sequence controller.

PLCのメモリエリアには、システムメモリ、プログラムメモリ、データメモリなどがある。システムメモリにはPLCの基本ソフトウェアが書き込まれており、プログラムメモリにはプログラマが作成したシーケンスプログラムが格納されている。PLCをRUNすると、基本ソフトウェアは、入力ユニットからの情報を処理し、プログラムメモリに記憶されているシーケンスプログラムに従ってシーケンス動作を演算し、その結果を出力ユニットに出力してシーケンス制御を実行する。 The PLC memory area includes a system memory, a program memory, a data memory, and the like. The basic PLC software is written in the system memory, and the sequence program created by the programmer is stored in the program memory. When the PLC is RUN, the basic software processes the information from the input unit, calculates the sequence operation according to the sequence program stored in the program memory, outputs the result to the output unit, and executes the sequence control.

シーケンスプログラムを作成するには、パーソナルコンピュータ(PC)に専用のソフトウェアをインストールするか、プログラミングコンソールなどのプログラム専用機器が用いられる。
このようなシーケンスプログラム編集装置は、入出力デバイスとの通信割付の設定、産業用ネットワークとの通信の設定等、PLCに関わる様々な設定や編集が可能である。
To create a sequence program, install dedicated software on a personal computer (PC) or use a program-dedicated device such as a programming console.
Such a sequence program editing device can make various settings and edits related to PLC, such as setting of communication allocation with an input / output device and setting of communication with an industrial network.

シーケンスプログラムの言語には、ラダー言語、ST(Strutured Text)言語、ニーモックなどがある。 The language of the sequence program includes a ladder language, an ST (Strutured Text) language, a knee mock, and the like.

ラダー言語とは、接点やコイルなどの回路を示す図記号を使ってシーケンス回路図を図式化した言語である。ラダープログラミングは、画面上で視覚的に作成することができる。例えば、特許文献1では、図記号を一覧表示し、画面上に回路を配置することで、ラダープログラムを作成する。
ST言語とは、テキスト形式のプログラム言語であり、構文による条件判断や反復などの制御が記述できる。ST言語では計算式などを一般の数式に近い形式で記述でき、数式や演算式を簡潔に記述できる。
ラダー言語とST言語とは、必ずしも独立した言語ではなく、「ラダーとST言語を組み合わせて記述する形」があり、これを「インラインST」と呼ぶ。
The ladder language is a language in which a sequence circuit diagram is schematized using graphic symbols indicating circuits such as contacts and coils. Ladder programming can be created visually on the screen. For example, in Patent Document 1, a ladder program is created by displaying a list of graphic symbols and arranging circuits on the screen.
The ST language is a text-format programming language, and can describe control such as conditional judgment and repetition by syntax. In the ST language, calculation formulas and the like can be described in a format similar to general formulas, and formulas and calculation formulas can be described concisely.
The ladder language and the ST language are not necessarily independent languages, but there is a "form in which the ladder and the ST language are described in combination", and this is called "inline ST".

ラダープログラムもSTプログラムも、ニーモニックに変換してPLCに転送される。ニーモニックは、PLCが実行可能な機械語のプログラムである。ニーモニックのプログラムも、ラダー言語やST言語と同様にプログラマが作成・編集することができる。 Both the ladder program and the ST program are converted into mnemonics and transferred to the PLC. A mnemonic is a machine language program that a PLC can execute. The mnemonic program can be created and edited by the programmer in the same way as the ladder language and ST language.

特開平9-16218号公報Japanese Unexamined Patent Publication No. 9-16218

PLCを使ってシーケンス制御を行うときにはまず、I/O割付を行う。I/O割付とは、機械や操作パネルの信号をPLCのどの入出力番号に接続するかを割り振ることである。 When performing sequence control using PLC, first, I / O allocation is performed. The I / O allocation is to allocate the input / output number of the PLC to which the signal of the machine or the operation panel is connected.

I/O割付では、入出力デバイスのアドレス、占有するアドレスのサイズ、入出力デバイスが取り付けられたスロット番号、コメントなどを含むメモリマップを作成し、シーケンス制御を行うときの、機械や操作パネルの信号をPLCのどの入出力番号に接続するかを設定する。
また、I/O割付では、内部アドレスを割り付ける。内部アドレスに割り付けられたアドレスは、シーケンスプログラムで仮想リレーとして使用できる。内部アドレスを使って産業用ネットワークの通信用のアドレスを割り付けることもできる。
In I / O allocation, a memory map including the I / O device address, the size of the occupied address, the slot number where the I / O device is installed, the comment, etc. is created, and the sequence control is performed on the machine or operation panel. Set which input / output number of the PLC the signal is connected to.
In the I / O allocation, an internal address is assigned. The address assigned to the internal address can be used as a virtual relay in the sequence program. You can also use the internal address to assign an address for communication on an industrial network.

従来、入出力デバイスのアドレスや内部アドレスをシーケンスプログラムに記述する際、画面に表示されたデータアドレスや図記号をラダー回路に手動で入力してラダープログラムを作成する(例えば、特許文献1)。しかしながら、この技術では、データアドレスやデータ識別名を事前に設定する必要があるため煩雑である。ST言語を使用する場合にも、データアドレスやデータ識別名の設定は煩雑である。 Conventionally, when describing the address or internal address of an input / output device in a sequence program, the data address or graphic symbol displayed on the screen is manually input to the ladder circuit to create a ladder program (for example, Patent Document 1). However, this technique is complicated because it is necessary to set a data address and a data identification name in advance. Even when the ST language is used, the setting of the data address and the data identification name is complicated.

シーケンスプログラムの作成において、プログラム編集を簡便にする技術が望まれている。 In creating a sequence program, a technique for simplifying program editing is desired.

本開示の一態様によるシーケンスプログラム編集装置は、シーケンスプログラムを編集するシーケンスプログラム編集装置であって、データアドレスの割付を受け付けるI/O割付設定部と、シーケンスプログラムの編集を受け付けるシーケンスプログラム編集部と、I/O割付設定部において設定されたデータアドレスに対する自動プログラム作成指令を受け付ける指令受付部と、自動プログラム作成指令を受け付けたデータアドレスの種類を判定し、データアドレスの種類が出力データアドレスの場合、データアドレスを出力とするシーケンスプログラムを作成するシーケンスプログラム生成部と、を有する。
本開示の一態様によるシーケンスプログラム編集方法は、シーケンスプログラムを編集するシーケンスプログラム編集方法であって、I/O割付されたデータアドレスに対する自動プログラム作成指令を受け付け、自動プログラム作成指令を受け付けたデータアドレスの種類を判定し、データアドレスの種類が出力データアドレスの場合、当該データアドレスを出力とするシーケンスプログラムを作成する。
本開示の一態様による記録媒体は、1つ又は複数のプロセッサが実行することにより、I/O割付されたデータアドレスに対する自動プログラム作成指令を受け付け、自動プログラム作成指令を受け付けたデータアドレスの種類を判定し、データアドレスの種類が出力データアドレスの場合、当該データアドレスを出力とするシーケンスプログラムを作成する。
The sequence program editing device according to one aspect of the present disclosure is a sequence program editing device that edits a sequence program, and includes an I / O allocation setting unit that accepts data address allocation and a sequence program editing unit that accepts sequence program editing. , When the command receiving unit that accepts the automatic program creation command for the data address set in the I / O allocation setting unit and the type of data address that received the automatic program creation command are determined, and the type of data address is the output data address. , A sequence program generation unit that creates a sequence program that outputs a data address.
The sequence program editing method according to one aspect of the present disclosure is a sequence program editing method for editing a sequence program, and is a data address that receives an automatic program creation command for an I / O-assigned data address and receives an automatic program creation command. If the type of data address is an output data address, create a sequence program that outputs the data address.
The recording medium according to one aspect of the present disclosure accepts an automatic program creation command for an I / O-assigned data address by being executed by one or more processors, and determines the type of data address that has received the automatic program creation command. If the judgment is made and the type of data address is an output data address, a sequence program that outputs the data address is created.

本発明の一態様により、シーケンスプログラムの作成において、プログラム編集を簡便にすることができる。 According to one aspect of the present invention, program editing can be simplified in the creation of a sequence program.

本開示のPCとPLCの概念図である。It is a conceptual diagram of the PC and PLC of this disclosure. シーケンスプログラム編集用ソフトウェアを備えたPCのハードウェア構成を示す図である。It is a figure which shows the hardware composition of the PC equipped with the software for editing a sequence program. PCのブロック図である。It is a block diagram of a PC. I/O割付画面を示す図である。It is a figure which shows the I / O allocation screen. ラダープログラムの自動作成を示す図である。It is a figure which shows the automatic creation of a ladder program. 自動作成されたラダープログラムを示す図である。It is a figure which shows the ladder program which was made automatically. ラダープログラムの自動作成を示す図である。It is a figure which shows the automatic creation of a ladder program. 自動作成されたラダープログラムを示す図である。It is a figure which shows the ladder program which was made automatically. STプログラムの自動作成を示す図である。It is a figure which shows the automatic creation of an ST program.

[第1の開示]
以下、図面を参照して本開示の概要を説明する。
図1には、パーソナルコンピュータ(PC)1とPLC2が存在する。PC1には、シーケンスプログラム編集用ソフトウェアがインストールされている。プログラマはPC1でシーケンスプログラムを作成し、PLC2に転送する。
[First disclosure]
Hereinafter, the outline of the present disclosure will be described with reference to the drawings.
In FIG. 1, a personal computer (PC) 1 and a PLC 2 are present. Sequence program editing software is installed in PC1. The programmer creates a sequence program on PC1 and transfers it to PLC2.

PC1は、図2のようなハードウェア構成を有する。PC1が備えるCPU111は、PC1を全体的に制御するプロセッサである。CPU111は、バス122を介してROM112に格納されたシステム・プログラムを読み出し、該システム・プログラムに従ってPC1全体を制御する。RAM113には一時的な計算データや表示データ、及び外部から入力された各種データ等が一時的に格納される。 PC1 has a hardware configuration as shown in FIG. The CPU 111 included in the PC 1 is a processor that controls the PC 1 as a whole. The CPU 111 reads out the system program stored in the ROM 112 via the bus 122, and controls the entire PC 1 according to the system program. Temporary calculation data, display data, various data input from the outside, and the like are temporarily stored in the RAM 113.

不揮発性メモリ114は、例えば図示しないバッテリでバックアップされたメモリやSSD(Solid State Drive)等で構成され、PC1の電源がオフされても記憶状態が保持される。不揮発性メモリ114には、インタフェース115を介して外部機器125から読み込まれたデータ、入力部124を介して入力されたデータ、ネットワークを介してPLC2から取得されたデータ等が記憶される。不揮発性メモリ114に記憶されたデータは、実行時/利用時にはRAM113に展開されてもよい。また、ROM112には、公知の解析プログラムなどの各種システム・プログラムが予め書き込まれている。 The non-volatile memory 114 is composed of, for example, a memory backed up by a battery (not shown), an SSD (Solid State Drive), or the like, and the storage state is maintained even when the power of the PC 1 is turned off. The non-volatile memory 114 stores data read from the external device 125 via the interface 115, data input via the input unit 124, data acquired from the PLC 2 via the network, and the like. The data stored in the non-volatile memory 114 may be expanded in the RAM 113 at the time of execution / use. Further, various system programs such as a known analysis program are written in advance in the ROM 112.

インタフェース115は、PC1のCPU111とPLC2とを接続するためのインタフェースである。インタフェース115を介してPC1が作成したシーケンスプログラムをPLC2に転送する。なお、可搬性のメモリを用いてシーケンスプログラムをPLC2に転送してもよい。 The interface 115 is an interface for connecting the CPU 111 of the PC 1 and the PLC 2. The sequence program created by PC1 is transferred to PLC2 via the interface 115. The sequence program may be transferred to PLC2 using a portable memory.

インタフェース120は、PC1のCPU111と有線乃至無線のネットワークとを接続するためのインタフェースである。ネットワークには、産業機械やフォグコンピュータ、クラウドサーバ等が接続され、PC1との間で相互にデータのやり取りを行っている。 The interface 120 is an interface for connecting the CPU 111 of the PC 1 to a wired or wireless network. Industrial machines, fog computers, cloud servers, etc. are connected to the network, and data is exchanged with and from the PC1.

表示部123には、メモリ上に読み込まれた各データ、プログラム等が実行された結果として得られたデータ等がインタフェース117を介して出力されて表示される。また、キーボードやポインティングデバイス等から構成される入力部124は、プログラマの入力をインタフェース118を介してCPU111に渡す。 On the display unit 123, each data read on the memory, data obtained as a result of executing the program, etc. are output and displayed via the interface 117. Further, the input unit 124 composed of a keyboard, a pointing device, or the like passes the programmer's input to the CPU 111 via the interface 118.

図3は、PC1のブロック図である。PC1は、プログラマからのI/O割付の設定を受け付けるI/O割付設定部11と、プログラマからのシーケンスプログラムの編集を受け付けるシーケンスプログラム編集部12と、プログラマからの自動プログラム作成指令を受け付ける指令受付部13と、データアドレスの属性情報を記憶するアドレス属性情報保持部14と、データアドレスの属性情報を基にシーケンスプログラムを自動生成するシーケンスプログラム生成部15と、を備える。 FIG. 3 is a block diagram of PC1. The PC 1 has an I / O allocation setting unit 11 that accepts I / O allocation settings from a programmer, a sequence program editing unit 12 that accepts sequence program editing from a programmer, and a command reception unit that accepts an automatic program creation command from a programmer. A unit 13, an address attribute information holding unit 14 that stores the attribute information of the data address, and a sequence program generation unit 15 that automatically generates a sequence program based on the attribute information of the data address are provided.

I/O割付設定部11は、図4に示すような、I/O割付画面20を表示し、プログラマからのI/O割付設定を受け付ける。本開示のI/O割付画面20は、図4に示すように、入出力デバイスのデータアドレス、データアドレスのサイズ、入出力デバイスを装着したスロット番号が設定できる。なお、図4の設定項目は、これに限定されない。 The I / O allocation setting unit 11 displays the I / O allocation screen 20 as shown in FIG. 4, and accepts the I / O allocation setting from the programmer. As shown in FIG. 4, the data address of the input / output device, the size of the data address, and the slot number in which the input / output device is mounted can be set on the I / O allocation screen 20 of the present disclosure. The setting items in FIG. 4 are not limited to this.

シーケンスプログラム編集部12は、シーケンスプログラム編集画面(第1の開示では、ラダー編集画面30)を表示し、シーケンスプログラム(第1の開示では、ラダープログラム)の編集を受け付ける。
ラダー編集画面30には、ラダープログラムを編集するためのラダー編集エリアが表示されている。
手動で出力命令を記述する場合、プログラマは、まず、出力コイルの図記号を選択し、出力コイルをラダー編集エリアに表示させる。そして、表示した出力コイルの設定画面などで出力コイルのデータアドレスを選択する。プログラマが適当なデータアドレスを選択すると、画面に表示された出力コイルとデータアドレスが対応づけられる。このとき、プログラマは必要に応じて出力コイルにコメントを付加したり、出力コイルの名称を分かりやすい名称に変更する。
このように、手動で出力命令を記述するには、画面操作やテキスト入力などを繰り返す必要がある。出力命令の数が多い場合には、手間や時間がかかりプログラマへの負担となる。
The sequence program editing unit 12 displays the sequence program editing screen (ladder editing screen 30 in the first disclosure) and accepts editing of the sequence program (ladder program in the first disclosure).
On the ladder editing screen 30, a ladder editing area for editing the ladder program is displayed.
When writing the output instruction manually, the programmer first selects the graphic symbol of the output coil and displays the output coil in the ladder edit area. Then, the data address of the output coil is selected on the displayed output coil setting screen or the like. When the programmer selects an appropriate data address, the output coil displayed on the screen is associated with the data address. At this time, the programmer adds a comment to the output coil or changes the name of the output coil to an easy-to-understand name as necessary.
In this way, in order to manually describe an output command, it is necessary to repeat screen operations and text input. If the number of output instructions is large, it takes time and effort, which is a burden on the programmer.

アドレス属性情報保持部14は、データアドレスの属性情報を記憶する。PLC2のデータアドレスには様々な種類がある。具体的には、出力データアドレス、入力データアドレス、内部データアドレス、メッセージ表示用データアドレスなどがある。通常、データアドレスの先頭のアルファベットは、データアドレスの種類を示している。アルファベットとデータアドレスの種類との関係は、PLC2のメーカや仕様によって異なる。 The address attribute information holding unit 14 stores the attribute information of the data address. There are various types of PLC2 data addresses. Specifically, there are an output data address, an input data address, an internal data address, a message display data address, and the like. Usually, the alphabet at the beginning of the data address indicates the type of data address. The relationship between the alphabet and the type of data address differs depending on the manufacturer and specifications of the PLC2.

指令受付部13は、プログラマから自動プログラム作成指令を受け付ける。本開示では、自動プログラム作成指令としてI/O割付画面20からラダー編集エリアへのドラッグアンドドロップを行う。図4の例では、I/O割付画面20のデータアドレス「Y0000」からラダー編集エリアの行番号1にマウスポインタをドラッグアンドドロップする。
なお、自動プログラム作成指令の入力方法は限定しない。ドラッグアンドドロップ以外の画面操作で入力してもよいし、ジェスチャーや音声で入力してもよい。
The command receiving unit 13 receives an automatic program creation command from the programmer. In the present disclosure, drag and drop from the I / O allocation screen 20 to the ladder editing area is performed as an automatic program creation command. In the example of FIG. 4, the mouse pointer is dragged and dropped from the data address “Y0000” of the I / O allocation screen 20 to the line number 1 of the ladder editing area.
The method of inputting the automatic program creation command is not limited. You may input by screen operation other than drag and drop, or you may input by gesture or voice.

シーケンスプログラム生成部15は、プログラマからの指令に従いラダー編集エリアに出力命令を作成する。図5を参照して説明すると、プログラマは、まず、I/O割付画面20のデータアドレス「Y0000」からラダー編集エリアの行番号1にマウスポインタをドラッグアンドドロップして自動プログラムの作成を指示する。
指令受付部13がプログラマからの指令を検知すると、シーケンスプログラム生成部15はアドレス属性情報保持部14を参照してデータアドレス「Y0000」の種類を判定する。ここでは、データアドレス「Y0000」の先頭のアルファベットが「Y」であるため出力データアドレスであると判定される。シーケンスプログラム生成部15は、プログラマが指定したデータアドレスが出力データアドレスの場合、I/O割付の「サイズ」を参照する。「サイズ」は「1」である。この場合、「サイズ」は「1バイト」なので8つ(8ビット)の出力コイルをラダープログラムの行番号1から8の各行に作成する。
The sequence program generation unit 15 creates an output command in the ladder editing area according to a command from the programmer. Explaining with reference to FIG. 5, the programmer first instructs the creation of an automatic program by dragging and dropping the mouse pointer from the data address “Y0000” of the I / O allocation screen 20 to the line number 1 of the ladder editing area. ..
When the command receiving unit 13 detects a command from the programmer, the sequence program generation unit 15 refers to the address attribute information holding unit 14 to determine the type of the data address "Y0000". Here, since the first alphabet of the data address "Y0000" is "Y", it is determined that the data address is an output data address. When the data address specified by the programmer is the output data address, the sequence program generation unit 15 refers to the “size” of the I / O allocation. The "size" is "1". In this case, since the "size" is "1 byte", eight (8 bits) output coils are created in each line of the ladder program line numbers 1 to 8.

ラダー編集エリアには、図5に示すように、8行のラダープログラムが作成される。各行の入力側母線にはa接点が作成されており、出力側母線には「Y0000.0」から「Y0000.7」のの出力コイルが作成される。a接点は、ダミー接点である。ラダーのプログラムでは入力側母線に必ず接点を接続しなければならないという制限がある。この制限を満たすために、ダミー接点を設けて、入出力の回路を生成する。なお、ダミー接点は必ずしもa接点でなくともよい。 As shown in FIG. 5, an eight-line ladder program is created in the ladder editing area. An a contact is created on the input side bus of each line, and an output coil of "Y0000.0" to "Y0000.7" is created on the output side bus. The a contact is a dummy contact. In the ladder program, there is a limitation that the contact must be connected to the input bus. In order to satisfy this limitation, a dummy contact is provided to generate an input / output circuit. The dummy contact does not necessarily have to be the a contact.

このように、本開示のプログラム編集装置では、プログラマがI/O割付で設定されたデータアドレスを選択すると、自動的に出力コイルを配置し、各出力コイルとデータアドレスとを対応づける。
手動でシーケンスプログラムを作成する場合、“図記号の選択”と“データアドレスの対応付け”を、それぞれの出力コイルに対して、手作業で行う必要があったが、本開示ではプログラマが指令するだけでシーケンスプログラムが作成されるので、プログラム編集を簡便にすることができる。
As described above, in the program editing device of the present disclosure, when the programmer selects the data address set by the I / O allocation, the output coil is automatically arranged and each output coil is associated with the data address.
When manually creating a sequence program, it was necessary to manually perform "selection of graphic symbols" and "correspondence of data addresses" for each output coil, but in this disclosure, the programmer commands it. Since the sequence program is created only by itself, the program editing can be simplified.

さらに、シーケンスプログラム生成部15は、アドレス属性情報保持部14を参照し、出力コイルの名称を変更してもよい。図6は、データアドレスの種類を出力コイルの名称に反映させた例である。シーケンスプログラム生成部15は、自動プログラムの作成指令を受けたデータアドレス「Y0000」の先頭アルファベットを読み出す。先頭アルファベットが「Y」の場合、データアドレスの種類は「外部デバイスへの出力」になる。シーケンスプログラム生成部15は、出力コイルの名称に「_output」を追加する。図6のラダープログラムでは、出力コイルの名称が「Y0000.1_output」から「Y0000.7_output」となっている。 Further, the sequence program generation unit 15 may refer to the address attribute information holding unit 14 and change the name of the output coil. FIG. 6 is an example in which the type of data address is reflected in the name of the output coil. The sequence program generation unit 15 reads out the first alphabet of the data address "Y0000" that has received the automatic program creation command. When the first alphabet is "Y", the type of data address is "output to external device". The sequence program generation unit 15 adds "_output" to the name of the output coil. In the ladder program of FIG. 6, the name of the output coil is changed from "Y0000.1_output" to "Y0000.7_output".

さらに、シーケンスプログラム生成部15は、コメントの内容を用いてラダープログラムに配置する出力コイルの名称を変更してもよい。
図7は、コメントの内容を出力コイルの名称に反映した例である。図7のI/O割付画面では、「Y0000」の8ビットのデータアドレスに対し、それぞれ「0:power lamp」「1:alarm lamp(green)」「2:alarm lamp(yellow)」「3:alarm lamp(red)」「4:alarm buzzer」「5:standby lamp」「6:cutting lamp」「7:reserved lamp」というコメントが設定されている。
シーケンスプログラム生成部15は、出力コイルの名称にコメントの内容を追加する。図7では、出力コイルの名称が「Y0000.0_power_lamp」「Y0000.1_alarm_lamp_green」「Y0000.2_alarm_lamp_yellow」「Y0000.3_alarm_lamp_red」「Y0000.4_alarm_buzzer」「Y0000.5_standby_lamp」「Y0000.6_cutting_lamp」「Y0000.7_reserved_lamp」となる。
なお、図7のコメントには、空白文字や「()」など出力コイルの名称として使えない文字が含まれるが、本開示のシーケンスプログラム生成部15はこれらの文字を「_」に自動変換している。自動変換の方法は一例であり、これに限定しない。
Further, the sequence program generation unit 15 may change the name of the output coil arranged in the ladder program by using the content of the comment.
FIG. 7 is an example in which the content of the comment is reflected in the name of the output coil. On the I / O allocation screen of FIG. 7, for the 8-bit data address of “Y0000”, “0: power lamp”, “1: alarm lamp (green)”, “2: alarm lamp (yellow)”, and “3: The comments "alarm lamp (red)", "4: alarm buzzer", "5: standby lamp", "6: cutting lamp", and "7: reserved lamp" are set.
The sequence program generation unit 15 adds the content of the comment to the name of the output coil. In FIG. 7, the names of the output coils are "Y0000.0_power_lamp", "Y0000.1_alarm_lamp_green", "Y0000.2_alarm_lamp_yellow", "Y0000.3_alarm_lamp_red", "Y0000.4_alarm_buzzzer", "Y0000.5_standby_rmp" and "Y0000.5_standby_rmp". Become.
The comment in FIG. 7 includes blank characters and characters that cannot be used as the name of the output coil, such as "()", and the sequence program generation unit 15 of the present disclosure automatically converts these characters into "_". ing. The method of automatic conversion is an example and is not limited to this.

さらに、シーケンスプログラム生成部15は、コメントの内容を出力コイルの近くに表示してもよい。
図8の例では、ラダープログラムの行にコメントの内容を表示している。図8では、「Y0000」の「Y0000.0」の出力回路の上に[Y0000.0:power lamp]、「Y0000.1」の出力回路の上に[Y0000.1:alarm lamp(green)]、「Y0000.2」の出力回路の上に[Y0000.2:alarm lamp(yellow)]、「Y0000.3」の出力回路の上に[Y0000.3:alarm lamp(red)]、「Y0000.4」の出力回路の上に[Y0000.4:alarm buzzer]、「Y0000.5」の出力回路の上に[Y0000.5:standby lamp]、「Y0000.6」の出力回路の上に[Y0000.6:cutting lamp]、「Y0000.7」の出力回路の上に[Y0000.7:reserved lamp]というコメントの内容が表示される。
Further, the sequence program generation unit 15 may display the content of the comment near the output coil.
In the example of FIG. 8, the content of the comment is displayed on the line of the ladder program. In FIG. 8, [Y0000.0: power lamp] is placed on the output circuit of “Y0000.0” of “Y0000”, and [Y0000.1: allarm lamp (green)] is placed on the output circuit of “Y0000.1”. , [Y0000.2: alarm lamp (yellow)] on the output circuit of "Y0000.2", [Y0000.3: alarm lamp (red)] on the output circuit of "Y0000.3", "Y0000. [Y0000.4: alarm buzzer] on the output circuit of "4", [Y0000.5: standby lamp] on the output circuit of "Y0000.5", and [Y00000] on the output circuit of "Y0000.6". .6: cutting lamp], the content of the comment [Y0000.7: reserved lamp] is displayed on the output circuit of "Y0000.7".

なお、I/O割付における「サイズ」の単位やデータアドレスの表示方法は、PLC2のメーカや仕様によって異なる。本開示の例では、「サイズ」の単位は1バイトであるが、1ビットにしてもよい。データアドレスは、「Y0000」から「Y0007」のように連続する整数としてもよい。 The unit of "size" and the display method of the data address in the I / O allocation differ depending on the manufacturer and specifications of the PLC2. In the example of the present disclosure, the unit of "size" is 1 byte, but it may be 1 bit. The data address may be a continuous integer such as "Y0000" to "Y0007".

また、本開示では、アドレス属性情報保持部14とシーケンスプログラム生成部15とを別々に設けたが、シーケンスプログラム生成部15がアドレス属性情報を記憶する構成としてもよい。 Further, in the present disclosure, the address attribute information holding unit 14 and the sequence program generation unit 15 are separately provided, but the sequence program generation unit 15 may be configured to store the address attribute information.

また、上述の例では、外部デバイスに出力する出力データアドレスのみを示したが、内部デバイスに出力する内部データアドレスも本開示に含める。内部データアドレスには、産業用ネットワークの通信設定に用いるものがある。本開示は、通信設定用の内部データアドレスに対しても自動的に出力コイルの回路を配置し、出力コイルとデータアドレスの対応付けを行い、自動的にシーケンスプログラムを生成する。 Further, in the above example, only the output data address to be output to the external device is shown, but the internal data address to be output to the internal device is also included in the present disclosure. Some internal data addresses are used for communication settings of industrial networks. In the present disclosure, the circuit of the output coil is automatically arranged also for the internal data address for communication setting, the output coil and the data address are associated with each other, and the sequence program is automatically generated.

[第2の開示]
第2の開示について説明する。第2の開示では、ST言語のシーケンスプログラム(以下、STプログラムと呼ぶ)を自動的に作成する。第2の開示のPC1と第1の開示のPC1とは、シーケンスプログラムの種類のみが異なる。そのため、プログラムの生成を行うシーケンスプログラム生成部15の説明のみを行う。
[Second disclosure]
The second disclosure will be described. In the second disclosure, an ST language sequence program (hereinafter referred to as an ST program) is automatically created. The PC1 of the second disclosure and the PC1 of the first disclosure differ only in the type of the sequence program. Therefore, only the sequence program generation unit 15 that generates the program will be described.

シーケンスプログラム生成部15は、プログラマからの指令に従いシーケンスプログラム編集画面(ここでは、ST編集画面40)にSTプログラムを作成する。図9の例では、I/O割付画面20のデータアドレス「Y0000」からST編集画面40にマウスポインタをドロップアンドドロップしている。シーケンスプログラム生成部15は、プログラマからの指令を受けると、アドレス属性情報保持部14を参照してデータアドレス「Y0000」の種類を判定する。データアドレス「Y0000」は、先頭のアルファベットが「Y」であるため出力データアドレスであると判定される。シーケンスプログラム生成部15は、プログラマが指定されたデータアドレスの場合、I/O割付の「サイズ」を参照する。「サイズ」は「1」である。この場合、「サイズ」は「1バイト」なので8つ(8ビット)の変数の宣言と、各変数の値を計算するための計算式を作成する。
図9の例では、ST編集画面40は、上下2段に分かれており、上部の変数宣言エリアで変数の宣言を行い、下部のプログラム編集エリアで計算式を作成する。変数宣言エリアでは、計算式のダミー入力として8つのBOOL値からなる配列「in_dammy」を宣言し、8つのBOOL値からなる配列「out_Y0」を宣言している。この宣言において、配列「out_Y0」の8つの要素である「out_Y0[0]」から「out_Y0[7]」とデータアドレス「Y0000.0」から「Y0000.7」とを対応づけている。
The sequence program generation unit 15 creates an ST program on the sequence program edit screen (here, the ST edit screen 40) according to a command from the programmer. In the example of FIG. 9, the mouse pointer is dropped and dropped from the data address “Y0000” of the I / O allocation screen 20 to the ST edit screen 40. Upon receiving a command from the programmer, the sequence program generation unit 15 determines the type of the data address "Y0000" with reference to the address attribute information holding unit 14. The data address "Y0000" is determined to be an output data address because the first alphabet is "Y". The sequence program generation unit 15 refers to the “size” of the I / O allocation when the data address is specified by the programmer. The "size" is "1". In this case, since the "size" is "1 byte", a declaration of eight variables (8 bits) and a calculation formula for calculating the value of each variable are created.
In the example of FIG. 9, the ST edit screen 40 is divided into upper and lower two stages, variables are declared in the upper variable declaration area, and a calculation formula is created in the lower program edit area. In the variable declaration area, an array "in_dammy" consisting of eight Boolean values is declared as a dummy input of the calculation formula, and an array "out_Y0" consisting of eight Boolean values is declared. In this declaration, the eight elements of the array "out_Y0", "out_Y0 [0]" to "out_Y0 [7]", are associated with the data addresses "Y0000.0" to "Y0000.7".

この例において、シーケンスプログラム生成部15は、配列名の前半に「out_」という文字を付加している。文字「out_」は必ずしも付加する必要はない。「out_」はデータアドレスの種類を示している。シーケンスプログラム生成部15は、データアドレスの先頭のアルファベット「Y」の属性情報が出力デバイスであるため、「out_」を付加している。 In this example, the sequence program generation unit 15 adds the character "out_" to the first half of the array name. The character "out_" does not necessarily have to be added. “Out_” indicates the type of data address. Since the attribute information of the alphabet "Y" at the beginning of the data address is the output device, the sequence program generation unit 15 adds "out_".

プログラム編集エリアには、8つの計算式が書かれている。8つの計算式の左辺は、変数宣言エリアで宣言した配列「out_Y0」の要素である。計算式の右辺は、変数宣言エリアで宣言したダミー入力としての配列「in_dammy」である。「out_Y0」と「in_dammy」の各要素の間には「代入記号(:=)」が記述されている。すなわち、ダミー入力「in_dammy」の値が出力「out_Y0」に代入される(すなわち、計算式の右辺が出力データアドレスに入力される)。 Eight calculation formulas are written in the program editing area. The left side of the eight calculation formulas is an element of the array "out_Y0" declared in the variable declaration area. The right side of the calculation formula is an array "in_dammy" as a dummy input declared in the variable declaration area. An "assignment symbol (: =)" is described between each element of "out_Y0" and "in_dammy". That is, the value of the dummy input "in_dammy" is assigned to the output "out_Y0" (that is, the right side of the calculation formula is input to the output data address).

なお、シーケンスプログラム生成部15は、第1の開示と同様に、I/O割付の「コメント」の内容をSTプログラムの配列名や変数名に追加してもよい。また、I/O割付の「コメント」の内容をそのままSTプログラムの配列名や変数名にしてもよい。 The sequence program generation unit 15 may add the content of the “comment” of the I / O allocation to the array name or variable name of the ST program, as in the first disclosure. Further, the content of the "comment" of the I / O allocation may be used as it is as the array name or variable name of the ST program.

以上説明したように、本開示のプログラム編集装置は、I/O割付で設定されたデータアドレスを基にシーケンスプログラムを自動作成する。具体的には、I/O割付のデータアドレスの先頭のアルファベットからデータアドレスの種類を判定し、データアドレスの種類が出力データアドレスであれば、該データアドレスに出力するシーケンスプログラムを作成する。 As described above, the program editing device of the present disclosure automatically creates a sequence program based on the data address set by the I / O allocation. Specifically, the type of the data address is determined from the alphabet at the beginning of the data address assigned to the I / O, and if the type of the data address is an output data address, a sequence program for outputting to the data address is created.

シーケンスプログラムがラダープログラムである場合、プログラム編集装置は、ラダープログラムを1行追加し、追加した行の出力側母線に出力コイルを配置する。出力コイルは、データアドレスの「サイズ」に対応した個数分作成され、各出力コイルはデータアドレスと関連づけられている。 When the sequence program is a ladder program, the program editing device adds one line of the ladder program and arranges the output coil on the output side bus of the added line. The number of output coils corresponding to the "size" of the data address is created, and each output coil is associated with the data address.

シーケンスプログラムがSTプログラムである場合、プログラム編集装置は、変数宣言エリアでデータアドレスに対応する変数を宣言する。変数は、データアドレスの「サイズ」に対応した長さの配列である。配列の各要素は、データアドレスと関連付けられている。 When the sequence program is an ST program, the program editing device declares the variable corresponding to the data address in the variable declaration area. A variable is an array of lengths corresponding to the "size" of the data address. Each element of the array is associated with a data address.

プログラム編集装置は、データアドレスの属性情報を確認し、シーケンスプログラムに付加する。プログラム編集装置は、データアドレスの先頭のアルファベットからデータアドレスの属性情報を判定し、シーケンスプログラムに付加する。
また、I/O割付のコメントの内容をシーケンスプログラムに付加する。
The program editing device confirms the attribute information of the data address and adds it to the sequence program. The program editing device determines the attribute information of the data address from the alphabet at the beginning of the data address and adds it to the sequence program.
In addition, the content of the comment of the I / O allocation is added to the sequence program.

1 パーソナルコンピュータ(PC)
2 PLC
11 I/O割付設定部
12 シーケンスプログラム編集部
13 指令受付部
14 アドレス属性情報保持部
15 シーケンスプログラム生成部
30 ラダー編集画面
40 ST編集画面
111 CPU
112 ROM
113 RAM
114 不揮発性メモリ
1 Personal computer (PC)
2 PLC
11 I / O allocation setting unit 12 Sequence program editing unit 13 Command reception unit 14 Address attribute information holding unit 15 Sequence program generation unit 30 Ladder editing screen 40 ST editing screen 111 CPU
112 ROM
113 RAM
114 Non-volatile memory

Claims (9)

シーケンスプログラムを編集するシーケンスプログラム編集装置であって、
データアドレスの割付を受け付けるI/O割付設定部と、
シーケンスプログラムの編集を受け付けるシーケンスプログラム編集部と、
前記I/O割付設定部において設定されたデータアドレスに対する自動プログラム作成指令を受け付ける指令受付部と、
前記自動プログラム作成指令を受け付けたデータアドレスの種類を判定し、前記データアドレスの種類が出力データアドレスの場合、前記データアドレスを出力とするシーケンスプログラムを作成するシーケンスプログラム生成部と、
を有するシーケンスプログラム編集装置。
A sequence program editing device that edits a sequence program.
I / O allocation setting unit that accepts data address allocation,
The sequence program editorial department that accepts the edit of the sequence program,
A command receiving unit that receives an automatic program creation command for the data address set in the I / O allocation setting unit, and a command receiving unit.
A sequence program generation unit that determines the type of data address that has received the automatic program creation command and creates a sequence program that outputs the data address when the data address type is an output data address.
Sequence program editing device with.
前記I/O割付設定部は、データアドレスのサイズの設定を受け付け、
前記シーケンスプログラム生成部は、前記サイズに相当する個数のデータアドレスを出力とするシーケンスプログラムを作成する、請求項1記載のシーケンスプログラム編集装置。
The I / O allocation setting unit accepts the setting of the size of the data address and accepts the setting.
The sequence program editing device according to claim 1, wherein the sequence program generation unit creates a sequence program that outputs a number of data addresses corresponding to the size.
前記シーケンスプログラム生成部は、前記データアドレスの種類を前記データアドレスの名称に反映させる、請求項1記載のシーケンスプログラム編集装置。 The sequence program editing device according to claim 1, wherein the sequence program generation unit reflects the type of the data address in the name of the data address. 前記I/O割付設定部は、前記データアドレスのコメントの設定を受け付け、
前記シーケンスプログラム生成部は、前記データアドレスの表示領域付近に前記データアドレスのコメントを表示する、請求項1記載のシーケンスプログラム編集装置。
The I / O allocation setting unit accepts the setting of the comment of the data address, and receives the setting.
The sequence program editing device according to claim 1, wherein the sequence program generation unit displays a comment of the data address in the vicinity of a display area of the data address.
前記シーケンスプログラム生成部は、前記自動プログラム作成指令を受け付けたデータアドレスを出力とし、ダミー接点を入力としたシーケンスプログラムを作成する請求項1記載のシーケンスプログラム編集装置。 The sequence program editing device according to claim 1, wherein the sequence program generation unit outputs a data address that has received the automatic program creation command and creates a sequence program with a dummy contact as an input. 前記シーケンスプログラムは、ラダープログラムであり、
前記シーケンスプログラム生成部は、前記自動プログラム作成指令を受け付けたデータアドレスに対応する出力コイルを出力側母線に配置する、請求項1記載のシーケンスプログラム編集装置。
The sequence program is a ladder program.
The sequence program editing device according to claim 1, wherein the sequence program generation unit arranges an output coil corresponding to a data address that has received the automatic program creation command on the output side bus.
前記シーケンスプログラムは、STプログラムであり、
前記シーケンスプログラム生成部は、前記自動プログラム作成指令を受け付けたデータアドレスに対応する変数を宣言し、当該変数を左辺とする計算式を作成する、請求項1記載のシーケンスプログラム編集装置。
The sequence program is an ST program and is an ST program.
The sequence program editing device according to claim 1, wherein the sequence program generation unit declares a variable corresponding to a data address that has received the automatic program creation command, and creates a calculation formula with the variable on the left side.
シーケンスプログラムを編集するシーケンスプログラム編集方法であって、
I/O割付されたデータアドレスに対する自動プログラム作成指令を受け付け、
前記自動プログラム作成指令を受け付けたデータアドレスの種類を判定し、前記データアドレスの種類が出力データアドレスの場合、当該データアドレスを出力とするシーケンスプログラムを作成する、シーケンスプログラム編集方法。
Editing a sequence program This is a sequence program editing method.
Accepts an automatic program creation command for the data address assigned to I / O,
A sequence program editing method for determining the type of data address that has received the automatic program creation command, and creating a sequence program that outputs the data address when the type of the data address is an output data address.
1つ又は複数のプロセッサが実行することにより、
I/O割付されたデータアドレスに対する自動プログラム作成指令を受け付け、
前記自動プログラム作成指令を受け付けたデータアドレスの種類を判定し、前記データアドレスの種類が出力データアドレスの場合、当該データアドレスを出力とするシーケンスプログラムを作成する、コンピュータが読み取り可能な命令を記憶する記憶媒体。
By being executed by one or more processors
Accepts an automatic program creation command for the data address assigned to I / O,
Determines the type of data address that has received the automatic program creation command, and if the type of data address is an output data address, stores a computer-readable instruction that creates a sequence program that outputs the data address. Storage medium.
JP2020159845A 2020-09-24 2020-09-24 Sequence program editing device, sequence program editing method, and computer readable storage medium Pending JP2022053177A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020159845A JP2022053177A (en) 2020-09-24 2020-09-24 Sequence program editing device, sequence program editing method, and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020159845A JP2022053177A (en) 2020-09-24 2020-09-24 Sequence program editing device, sequence program editing method, and computer readable storage medium

Publications (1)

Publication Number Publication Date
JP2022053177A true JP2022053177A (en) 2022-04-05

Family

ID=80963131

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020159845A Pending JP2022053177A (en) 2020-09-24 2020-09-24 Sequence program editing device, sequence program editing method, and computer readable storage medium

Country Status (1)

Country Link
JP (1) JP2022053177A (en)

Similar Documents

Publication Publication Date Title
JP6351899B1 (en) Ladder program editing support apparatus and ladder program editing method
JP3819639B2 (en) Programming device
JP6375666B2 (en) Programming tools for PLC and PLC
JP2009146229A (en) Programmable controller system
JP6201574B2 (en) Programming tool for PLC
JP2009157533A (en) Programmable controller system
JP4842541B2 (en) Display device for control, screen data generation device, and program and recording medium thereof
JP5490170B2 (en) Program creation support apparatus and program creation support method
JP2022053177A (en) Sequence program editing device, sequence program editing method, and computer readable storage medium
EP3951519A1 (en) Development support device, method for controlling development support device, information processing program, and recording medium
JP2008165324A (en) Program creation support device
WO2022244425A1 (en) Development assistance device, control method for development assistance device, information processing program, and recording medium
CN111506306A (en) Method and device for compiling Ansible script and electronic equipment
JP2019159478A (en) Controller, data creation device, and control method and control program
JPH02205976A (en) Program generator
JP5079166B1 (en) Symbol table generation method, communication method with peripheral device, and programmable logic controller
JP2022053180A (en) Sequence program editing device, sequence program editing method, and computer readable storage medium
JP5492573B2 (en) Device / PLC simulator device, method, and program having trace function
WO2020213129A1 (en) Debugging assistance device, debugging assistance method and debugging assistance program
JP2005115969A (en) Programmable controller
JP2003044105A (en) Editor device, editor program, and recording medium where the same is recorded
JP3464417B2 (en) Test display method of screen data for control device
JP3497423B2 (en) Display device for control, control system, and recording medium on which program is recorded
JP3512685B2 (en) SCREEN DATA CREATION METHOD, SCREEN DATA CREATION DEVICE, AND RECORDING MEDIUM CONTAINING THE PROGRAM
US20230134007A1 (en) Support device, non-transitory computer-readable storage medium, and support method