JP2011108070A - Scale transformation method of analog data - Google Patents
Scale transformation method of analog data Download PDFInfo
- Publication number
- JP2011108070A JP2011108070A JP2009263622A JP2009263622A JP2011108070A JP 2011108070 A JP2011108070 A JP 2011108070A JP 2009263622 A JP2009263622 A JP 2009263622A JP 2009263622 A JP2009263622 A JP 2009263622A JP 2011108070 A JP2011108070 A JP 2011108070A
- Authority
- JP
- Japan
- Prior art keywords
- scale conversion
- program
- plc
- module
- analog
- 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
Links
Images
Landscapes
- Programmable Controllers (AREA)
Abstract
Description
本発明は、プログラマブルコントローラ(PLC)のユーザプログラムのプログラミングにおいてアナログデータのスケール変換のためのプログラム作成を不要にして当該ユーザプログラムをより容易に作成可能とすることに関するものである。 The present invention relates to making it possible to create a user program more easily without the need for creating a program for scale conversion of analog data in programming a user program of a programmable controller (PLC).
PLCは、機械をユーザプログラムに従い制御するものであり、PLCモジュールや、PLCモジュールに信号を入・出力する各種入・出力モジュール等を備える。入・出力モジュールは入力モジュール、出力モジュール等を含む。PLCモジュールは、ユーザプログラムをファームウエアに従い実行するCPUや、各種プログラムを格納し、また、CPUの演算結果などのデータを格納する各種メモリ等から構成される。上記ユーザプログラムは、プログラミングツールにより設計される。プログラム設計者は、プログラミングツールによりユーザプログラムを設計した後、そのユーザプログラムをPLCに転送する。PLCに転送されたユーザプログラムはプログラムメモリに格納される。PLCは、ファームウエアに従い、そのユーザプログラムを実行する(例えば特許文献1参照。)。 The PLC controls the machine according to a user program, and includes a PLC module and various input / output modules that input / output signals to / from the PLC module. The input / output module includes an input module, an output module, and the like. The PLC module includes a CPU that executes a user program according to firmware, various programs, and various memories that store data such as calculation results of the CPU. The user program is designed by a programming tool. The program designer designs the user program with the programming tool and then transfers the user program to the PLC. The user program transferred to the PLC is stored in the program memory. The PLC executes the user program according to the firmware (see, for example, Patent Document 1).
以上のPLCでは、入力モジュールにおいて入力デバイスである例えば温度センサからの温度検出にかかるアナログ信号をデジタル信号に変換したうえで、PLCモジュールに入力する。そしてPLCモジュールではユーザプログラムに従い上記入力モジュールからのデジタル信号を処理する。この場合、プログラム設計者であるユーザーは、アナログ信号が例えば0〜5Vの電圧範囲において0〜100℃の温度範囲を表す場合、その0〜5Vのアナログ信号を0〜4095の12ビットのデジタル信号にA/D変換してPLCモジュールに入力する場合、PLCモジュールにおけるユーザプログラムでは、そのデジタル信号をスケール変換(スケーリング)する必要がある。この場合、0〜5Vの電圧範囲を0〜100℃の温度範囲にスケール変換する場合ではなく、その他の電圧範囲、例えば1〜3Vを上記温度範囲にスケール変換する場合、あるいは、0〜5Vの電圧範囲を−50〜120℃の温度範囲にスケール変換する場合もある。 In the above-described PLC, an analog signal related to temperature detection from, for example, a temperature sensor which is an input device in the input module is converted into a digital signal and then input to the PLC module. The PLC module processes the digital signal from the input module according to the user program. In this case, when the analog signal represents a temperature range of 0 to 100 ° C. in a voltage range of 0 to 5 V, for example, the user who is a program designer converts the analog signal of 0 to 5 V to a 12-bit digital signal of 0 to 4095. In the case of A / D conversion and input to the PLC module, the user program in the PLC module needs to perform scale conversion (scaling) on the digital signal. In this case, the voltage range of 0 to 5 V is not scaled to the temperature range of 0 to 100 ° C., but other voltage ranges, for example, 1 to 3 V are scaled to the above temperature range, or 0 to 5 V The voltage range may be scaled to a temperature range of −50 to 120 ° C.
詳しく説明すれば、0〜5Vに対して0〜100℃、1〜3Vに対して0〜100℃、0〜5Vに対して−50〜120℃というスケール変換概念の中に、0〜4095というスケール変換概念が入るために、プログラム設計者であるユーザーは、結局、三者間でスケール変換を扱うこととなるので、PLCモジュール内にはそれら三者間に対応したスケール変換プログラムを組み込む必要があり、プログラム設計が非常に煩雑化し、プログラム設計が面倒となっていた。 If it explains in detail, it is 0-4095 in 0-100 degreeC with respect to 0-5V, 0-100 degreeC with respect to 1-3V, and -50-120 degreeC with respect to 0-5V. Since the scale conversion concept is introduced, the user who is the program designer will eventually handle the scale conversion among the three parties, so it is necessary to incorporate a scale conversion program corresponding to the three parties in the PLC module. The program design has become very complicated and the program design has become troublesome.
したがって、本発明では、ユーザプログラムの作成上でアナログデータのスケール変換を行う場合、デジタルデータをスケール変換で扱う必要性をなくしてユーザプログラムの作成を容易化することを解決すべき課題としている。 Therefore, in the present invention, when analog data scale conversion is performed in creating a user program, it is an object to be solved to eliminate the need to handle digital data by scale conversion and facilitate the creation of the user program.
本発明によるPLC内でのアナログデータのスケール変換方法は、プログラミングツールのユーザプログラム作成画面上に、スケール変換ウインドウを呼び出すステップと、上記スケール変換ウインドウ内にアナログデータの入力範囲とこれに対応するスケール変換範囲とをプログラミングツールにより記入するステップと、上記記入を確定させるステップと、上記確定により、ユーザプログラムには上記記入に対応した内容でデジタルデータへのスケール変換を行うプログラムをファームウエアとしてPLCに組み込むステップと、を有することを特徴とするものである。 The analog data scale conversion method in the PLC according to the present invention includes a step of calling a scale conversion window on a user program creation screen of a programming tool, an input range of analog data in the scale conversion window, and a scale corresponding thereto. The step of entering the conversion range with a programming tool, the step of confirming the entry, and the confirmation confirms that the user program has a program that performs scale conversion into digital data with the contents corresponding to the entry as firmware. And a step of incorporating.
上記PLCにおいては、例えば、アナログ入力モジュールに温度センサからの温度検出信号がアナログデータの形式で入力された場合、アナログ入力モジュールからPLCモジュールへの温度検出信号はアナログデータ形式からデジタルデータ形式にスケール変換する必要がある。この場合、スケール変換ウインドウ上でアナログデータの入力範囲とこれに対応するスケール変換範囲とを記入し、この記入を確定するのみで、上記温度検出信号をアナログデータ形式からデジタルデータ形式へのスケール変換がファームウエアとして行われるので、ユーザーは温度検出信号をアナログデータ形式からデジタルデータ形式へスケール変換するプログラムを作成する必要がなくなり、ユーザプログラムの作成が容易になる。 In the above PLC, for example, when a temperature detection signal from a temperature sensor is input to the analog input module in the form of analog data, the temperature detection signal from the analog input module to the PLC module is scaled from an analog data format to a digital data format. Need to convert. In this case, enter the analog data input range and the corresponding scale conversion range on the scale conversion window, and confirm the entry to convert the temperature detection signal from analog data format to digital data format. Therefore, the user does not need to create a program for converting the temperature detection signal from the analog data format to the digital data format, and the user program can be easily created.
本発明によれば、ユーザプログラムの作成上でアナログデータをデジタルデータにスケール変換するプログラムを作成する必要がないので、ユーザプログラムの作成が容易になる。 According to the present invention, it is not necessary to create a program for converting analog data to digital data when creating a user program, so that it is easy to create a user program.
以下、添付した図面を参照して、本発明の実施の形態に係るPLC内でのアナログデータのスケール変換方法を説明する。図1にこの方法を実施する温度監視制御システムの構成を示す。同図を参照して、1は温度センサ、2はPLC、3は温度監視用の表示ランプ、4はプログラミングツールを示す。 Hereinafter, a method for converting the scale of analog data in a PLC according to an embodiment of the present invention will be described with reference to the accompanying drawings. FIG. 1 shows the configuration of a temperature monitoring control system that implements this method. Referring to FIG. 1, 1 is a temperature sensor, 2 is a PLC, 3 is a display lamp for temperature monitoring, and 4 is a programming tool.
温度センサ1は、図示略の制御対象の温度を所定の温度範囲で検出することができるものであり、その検出温度に対応した電圧をアナログ温度検出信号として出力することができるセンサである。温度センサ1は、例えば検出温度範囲t1〜t2℃に対して電圧範囲V1〜V2でアナログ温度検出信号を出力することができるセンサであり、具体的には、例えば検出温度範囲0〜100℃に対して例えば電圧範囲0〜5Vでアナログ温度検出信号を出力することができるようになっている。もちろん、温度センサ1は、同一検出温度範囲0〜100℃に対して別の電圧範囲1〜3Vでアナログ温度検出信号を出力するセンサでもよいし、検出温度範囲0〜100℃ではなく、別の検出温度範囲−50〜120℃に対して電圧範囲0〜5Vでアナログ温度検出信号を出力することができるセンサでもよい。実施の形態では、説明の都合で検出温度範囲0〜100℃に対して電圧範囲0〜5Vでアナログ温度検出信号を出力するものとしている。
The
PLC2は、アナログ入力モジュール2aと、PLCモジュール2bと、デジタル出力モジュール2cと、を含む。なお、これらモジュール2a,2b,2cは、モジュール形態ではなく、PLC2内部の機能別名称としてアナログ入力部2a、PLC部2b、デジタル出力部2cと称することもできる。
The
アナログ入力モジュール2aは、温度センサ1からの電圧範囲0〜5Vのアナログ温度検出信号をデジタル範囲0〜4095のデジタル値で出力する。
The
PLCモジュール2bは、アナログ入力モジュール2aから入力するデジタル値に対応してラダープログラムを実行してデジタル出力モジュール2cを介して表示ランプ3の点灯を制御する。PLCモジュール2bは、図2で示すように、ラダープログラムの実行CPUb1、ファームウエア(システム制御プログラム)格納メモリb2、ラダープログラム格納メモリb3、制御動作の結果に関するデータの記憶用内部メモリb4、入・出力インターフェースb5、通信インターフェースb6、およびスケール演算部b7を有している。入・出力インターフェースb5には、アナログ入力モジュール2aとデジタル出力モジュール2cとが接続されている。通信インターフェースb6には、プログラミングツール4が接続されている。
The
デジタル出力モジュール2cは、PLCモジュール2bからの制御信号により、表示ランプ3を駆動する。
The
表示ランプ3は、複数色の表示ランプ、例えば黄色表示ランプ3a、緑色表示ランプ3bおよび赤色表示ランプ3cで構成されている。表示ランプ3において、黄色表示ランプ3aはデジタル出力モジュール2cの出力Y1により、緑色表示ランプ3bはデジタル出力モジュール2cの出力Y2により、赤色表示ランプ3cはデジタル出力モジュール2cの出力Y3により、それぞれの色で発光する。これら各表示ランプ3a〜3cは図3で示すラダープログラムにより発光を制御される。このラダープログラムは、温度センサ1により検出した温度が20℃未満であれば入力X1がオンし、デジタル出力モジュール2cから出力Y1を出力して黄色表示ランプ3aを点灯させ、20℃以上、80℃以下であれば、入力X2a、X2bがオンし、デジタル出力モジュール2cから出力Y2を出力して緑色表示ランプ3bを点灯させ、80℃超であれば、入力X3がオンし、デジタル出力モジュール2cから出力Y3を出力して赤色表示ランプ3cを点灯させるためのプログラムである。
The
PLCモジュール2bには、アナログ入力モジュール2aからの温度センサ1の温度検出に関わる0〜4095内のデジタル変換値が入力される。ファームウエアメモリb2には、スケール演算部b7がスケール変換の演算を行うためのファームウエアが格納されている。CPUb1は、アナログ入力モジュール2aから0〜4095内のデジタル値のアナログ温度検出信号が入力されると、スケール演算部b7でそのデジタル値をスケール変換し、そのスケール変換した値により、図3のラダープログラムを実行するようになっている。
The
そのスケール演算のためのファームウエアについて図4以降を参照して説明する。図4はプログラミングツール4の編集画面4aを示す。この編集画面4aには、図3のラダープログラムが表示されている。そして、図5で示すようにスケール変換ウインドウW1を編集画面4a上に表示する。該編集画面4aは、タイトルバー、メニューバー、ツールバー、ステータスバー、等を有すると共に、ユーザインターフェース画面として、その画面構成が複数のエリアに分けられ、実施の形態では、ラダー図編集エリアA1、ナビゲーションエリア(Navigation)A2、部品リストエリア(Instruction List)A3、を備えている。
The firmware for the scale calculation will be described with reference to FIG. FIG. 4 shows an
プログラミングツール4が備えるマウスやキーボード等の操作部で、編集画面4aの各エリアを操作することにより、ラダープログラムの編集、修正、変更等の作業が行われる。ラダー図編集エリアA1には、ラダー図が表示されている。このラダー図には、ラダープログラム部分が表示されている。このラダープログラム部分を構成するデバイス接点は、部品リストエリアA3に表示しているラダー部品が選択されて配置される。上記ラダー部品は、ラダー部品リストエリアA3内の「Contact」、「Coil」、「Timer/Counter」等と表示されている部分から選択されるようになっている。ナビゲーションエリアA2において、「Ladder Program」「Monitor」等の表示があり、これら各表示領域にフォーカスしてマウスクリックすることで、編集画面4f上に各種画面をウインドウ形式で呼び出すことができる。
By operating each area of the
スケール変換ウインドウW1は、図6で詳細するように、アナログデータである温度センサ1の入力範囲0〜5Vにおいて、最大値(Max)記入ボックス10,10aに「5.0」、最小値(Min)記入ボックス11,11aに「0.0」、最大値(Max)記入ボックス10,10aに対応するスケール変換値記入ボックス12,12aに「100.0」、最小値(Min)記入ボックス11,11aに対応するスケール変換値記入ボックス13,13aに「0.0」をそれぞれ記入する。この記入後に「OK」をマウスクリックすることで当該記入の確定を行う。そしてこの確定後は、PLCモジュール2bのファームウエアメモリb2に、そのスケール変換ファームウエアが設定され、スケール演算部b7は、このスケール変換ファームウエアに従いスケール変換の演算を行う。そして、この演算の結果、温度センサ1により検出した温度が20℃未満であれば入力X1がオンし、デジタル出力モジュール2cから出力Y1を出力して黄色表示ランプ3aが点灯し、20℃以上、80℃以下であれば、入力X2a、X2bがオンし、デジタル出力モジュール2cから出力Y2を出力して緑色表示ランプ3bが点灯し、80℃超であれば、入力X3がオンし、デジタル出力モジュール2cから出力Y3を出力して赤色表示ランプ3cが点灯する。
As shown in detail in FIG. 6, the scale conversion window W <b> 1 displays “5.0” and a minimum value (Min) in the maximum value (Max)
なお、図7で示すスケール変換ウインドウW2では、PLCモジュール2bに例えばスケール変換範囲を0〜100としてスケール変換記入ボックス14,14a,15,15aに「100.0」「0.0」を記入し、また、このスケール変換に対して出力範囲の最大値記入ボックス16,16aに「5.0」、出力範囲の最小値記入ボックス17,17aに「0.0」をそれぞれ記入すると、デジタル出力モジュール2cから表示ランプ3a〜3cを上記電圧範囲でそれぞれ点灯制御することができる。
In the scale conversion window W2 shown in FIG. 7, for example, the scale conversion range is set to 0 to 100 in the
以上から、本実施の形態では、アナログ入力モジュール2aに温度センサ1からの温度検出信号がアナログデータの形式で入力された場合、アナログ入力モジュール2aからPLCモジュール2bへの温度検出信号はアナログデータ形式からデジタルデータ形式にスケール変換する必要がある。この場合、スケール変換ウインドウW1上でアナログデータの入力範囲とこれに対応するスケール変換範囲とを記入し、この記入を確定するのみで、上記温度検出信号をアナログデータ形式からデジタルデータ形式へのスケール変換がファームウエアとして行われるので、ユーザーは温度検出信号をアナログデータ形式からデジタルデータ形式へスケール変換するプログラムを作成する必要がなくなり、ユーザプログラムの作成が容易になる。
As described above, in the present embodiment, when the temperature detection signal from the
なお、実施の形態では温度監視制御システムを例示したが、本発明はこのシステムに限定されるものではない。 In the embodiment, the temperature monitoring control system is exemplified, but the present invention is not limited to this system.
1 温度センサ(入力デバイス)
2 PLC
2a アナログ入力モジュール
2b PLCモジュール
2c デジタル出力モジュール
3 表示ランプ
4 プログラミングツール
1 Temperature sensor (input device)
2 PLC
2a
Claims (1)
上記スケール変換ウインドウ内にアナログデータの入力範囲とこれに対応するスケール変換範囲とをプログラミングツールにより記入する第2ステップと、
上記記入を確定させる第3ステップと、
上記確定により、上記記入に対応した内容でデジタルデータへのスケール変換を行うプログラムをファームウエアとしてPLCに組み込む第4ステップと、
を有することを特徴とするPLC内でのアナログデータのスケール変換方法。 A first step of calling a scale conversion window on a user program creation screen of a programming tool;
A second step of entering an analog data input range and a corresponding scale conversion range by a programming tool in the scale conversion window;
A third step to confirm the entry,
A fourth step of incorporating into the PLC as firmware a program for performing scale conversion into digital data with the contents corresponding to the entry by the confirmation;
A method for scaling analog data in a PLC, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009263622A JP2011108070A (en) | 2009-11-19 | 2009-11-19 | Scale transformation method of analog data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009263622A JP2011108070A (en) | 2009-11-19 | 2009-11-19 | Scale transformation method of analog data |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011108070A true JP2011108070A (en) | 2011-06-02 |
Family
ID=44231453
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009263622A Pending JP2011108070A (en) | 2009-11-19 | 2009-11-19 | Scale transformation method of analog data |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011108070A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104317242A (en) * | 2014-10-30 | 2015-01-28 | 南京信息职业技术学院 | Industrial sensor application experiment platform |
CN109032056A (en) * | 2018-06-13 | 2018-12-18 | 华东师范大学 | Programmable logic controller (PLC) programming language conversion method |
WO2019102828A1 (en) * | 2017-11-24 | 2019-05-31 | オムロン株式会社 | Conversion information acquisition device, program development assistance device, conversion information acquisition method, and conversion information acquisition program |
-
2009
- 2009-11-19 JP JP2009263622A patent/JP2011108070A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104317242A (en) * | 2014-10-30 | 2015-01-28 | 南京信息职业技术学院 | Industrial sensor application experiment platform |
CN104317242B (en) * | 2014-10-30 | 2017-01-25 | 南京信息职业技术学院 | Industrial sensor application experiment platform |
WO2019102828A1 (en) * | 2017-11-24 | 2019-05-31 | オムロン株式会社 | Conversion information acquisition device, program development assistance device, conversion information acquisition method, and conversion information acquisition program |
JP2019096160A (en) * | 2017-11-24 | 2019-06-20 | オムロン株式会社 | Conversion information acquisition device, program development support device, conversion information acquisition method and conversion information acquisition program |
CN109032056A (en) * | 2018-06-13 | 2018-12-18 | 华东师范大学 | Programmable logic controller (PLC) programming language conversion method |
CN109032056B (en) * | 2018-06-13 | 2020-01-10 | 华东师范大学 | Programmable logic controller programming language conversion method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4952401B2 (en) | PLC | |
JP5018477B2 (en) | Inverter | |
JP6458754B2 (en) | Program development support apparatus, program development support program, and program development support method | |
JP6434434B2 (en) | A processing robot system that connects a processing device to a robot for processing | |
JP5785501B2 (en) | Ladder program creation device | |
JP6354178B2 (en) | Image processing apparatus, management system, and management method | |
WO2006011584A1 (en) | Safe plc, sequence program creation support software, and sequence program judgment method | |
JP2011108070A (en) | Scale transformation method of analog data | |
JP5921765B2 (en) | Program graph display device, program graph display method, and program graph display program | |
JP2006277734A (en) | Network diagram display device | |
JP6412698B2 (en) | Power converter | |
JP2012159868A (en) | Programming device of programmable logic controller | |
JP5566473B2 (en) | System design equipment | |
KR101701691B1 (en) | Programmable logic controller system and arithmetic unit | |
JP2006302216A (en) | Display device, screen data producing device and screen display system | |
JP2010079354A (en) | Distributed plc system | |
US11985036B2 (en) | Network management device, management method, and recording medium | |
JP2006214789A (en) | Support tool of transmitter | |
JP6632692B1 (en) | Control program creation support tool and control program creation method | |
JP5377377B2 (en) | Design support device | |
JP2007094546A (en) | Control system | |
JP6474253B2 (en) | Display system | |
JP5783992B2 (en) | Screen data simulation system and simulation software for programmable display, programmable display | |
JP2014191566A (en) | Screen definition device of operation panel | |
JP2018156214A (en) | SFC program creation support apparatus, SFC program creation support program, and SFC program creation method |