JP6801598B2 - Open / close detection device and machine tools - Google Patents
Open / close detection device and machine tools Download PDFInfo
- Publication number
- JP6801598B2 JP6801598B2 JP2017144611A JP2017144611A JP6801598B2 JP 6801598 B2 JP6801598 B2 JP 6801598B2 JP 2017144611 A JP2017144611 A JP 2017144611A JP 2017144611 A JP2017144611 A JP 2017144611A JP 6801598 B2 JP6801598 B2 JP 6801598B2
- Authority
- JP
- Japan
- Prior art keywords
- input
- switch
- code
- open
- identification code
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Program-control systems
- G05B19/02—Program-control systems electric
- G05B19/04—Program control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Program control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/30—Nc systems
- G05B2219/34—Director, elements to supervisory
- G05B2219/34222—Computer sends displacement and selected device to output register
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Keying Circuit Devices (AREA)
- Machine Tool Sensing Apparatuses (AREA)
- Electronic Switches (AREA)
Description
本発明は、スイッチの開閉を検出する開閉検出装置及び工作機械に関する。 The present invention relates to an open / close detection device and a machine tool for detecting the open / close of a switch.
従来、開閉検出装置はスイッチを介して接続した出力端子及び入力端子を備える。開閉検出装置は、スイッチのチャタリングによる影響を抑制する為の構成を備える。例えば、予めスイッチのオン又はオフを示す所定回数を設定し、前記所定回数オン又はオフを示す信号を入力した場合、開閉検出装置はスイッチの開又は閉を検出する。スイッチの劣化によってチャタリングの時間が長くなることを考慮し、開閉検出装置は所定時間経過後、前記所定回数を増加する(特許文献1参照)。 Conventionally, an open / close detection device includes an output terminal and an input terminal connected via a switch. The open / close detection device has a configuration for suppressing the influence of chattering of the switch. For example, when a predetermined number of times indicating on or off of the switch is set in advance and a signal indicating the on or off of the predetermined number of times is input, the open / close detection device detects the opening or closing of the switch. Considering that the chattering time becomes longer due to the deterioration of the switch, the open / close detection device increases the predetermined number of times after the lapse of a predetermined time (see Patent Document 1).
しかし前記開閉検出装置は所定回数が増加するので、スイッチの開又は閉を検出するまでに長時間を要する。 However, since the open / close detection device increases a predetermined number of times, it takes a long time to detect the opening or closing of the switch.
またチャタリングによる影響を抑制する為に、開閉検出装置は抵抗及びコンデンサを有するローパスフィルタを使用することがある。ローパスフィルタを使用する場合、出力端子から出力した信号から高周波の波形が低減し、開閉検出装置は高周波のパルスを認識できない。高周波のパルスを認識する為に、パルス波形の波長を長くして低周波にした場合、スイッチの開又は閉を検出するまでに長時間を要する。 Further, in order to suppress the influence of chattering, the open / close detection device may use a low-pass filter having a resistor and a capacitor. When a low-pass filter is used, the high-frequency waveform is reduced from the signal output from the output terminal, and the open / close detection device cannot recognize the high-frequency pulse. When the wavelength of the pulse waveform is lengthened to a low frequency in order to recognize a high-frequency pulse, it takes a long time to detect the opening or closing of the switch.
本発明は斯かる事情に鑑みてなされたものであり、スイッチの開又は閉を短時間で検出可能な開閉検出装置及び工作機械を提供することを目的とする。 The present invention has been made in view of such circumstances, and an object of the present invention is to provide an open / close detection device and a machine tool capable of detecting the opening or closing of a switch in a short time.
本発明に係る開閉検出装置は、信号を出力する出力端子と、該出力端子にスイッチを介して接続した入力端子と、該入力端子からの入力信号に基づき、スイッチの開閉を検出する検出部とを備える開閉検出装置であって、前記スイッチに対応した識別符号を記憶した記憶部を備え、前記出力端子は前記識別符号を示す信号を出力し、前記検出部は、前記入力信号が示す入力符号が前記識別符号と一致する場合、前記スイッチの閉を検出し、前記入力信号が示す入力符号が前記識別符号と不一致である場合、前記スイッチの開を検出する。 The open / close detection device according to the present invention includes an output terminal that outputs a signal, an input terminal connected to the output terminal via a switch, and a detection unit that detects open / close of the switch based on an input signal from the input terminal. An opening / closing detection device comprising a storage unit that stores an identification code corresponding to the switch, the output terminal outputs a signal indicating the identification code, and the detection unit outputs an input code indicated by the input signal. When matches the identification code, the closing of the switch is detected, and when the input code indicated by the input signal does not match the identification code, the opening of the switch is detected.
本発明においては、スイッチに対応した識別符号と入力符号の一致又は不一致に基づき、検出部はスイッチの開閉を検出する。チャタリングが発生している場合、識別符号と入力符号は不一致であり、検出部はスイッチの開を検出する。チャタリングが収束した場合、識別符号と入力符号は一致し、検出部は直ちにスイッチの閉を検出する。 In the present invention, the detection unit detects the opening / closing of the switch based on the match or mismatch between the identification code corresponding to the switch and the input code. When chattering has occurred, the identification code and the input code do not match, and the detection unit detects the opening of the switch. When the chattering converges, the identification code and the input code match, and the detection unit immediately detects that the switch is closed.
本発明に係る開閉検出装置は、前記出力端子及び入力端子を夫々複数備え、複数の前記出力端子及び入力端子は複数の前記スイッチを介して夫々接続してあり、各スイッチに固有の複数の前記識別符号を前記記憶部は記憶しており、前記検出部は前記複数の識別符号夫々と複数の前記入力符号夫々との比較を並行に実行する。 The open / close detection device according to the present invention is provided with a plurality of output terminals and input terminals, respectively, and the plurality of output terminals and input terminals are connected to each other via the plurality of switches, and the plurality of said devices unique to each switch are connected. The storage unit stores the identification code, and the detection unit executes comparison between the plurality of identification codes and the plurality of input codes in parallel.
本発明においては、複数の出力端子及び入力端子が複数のスイッチに夫々接続してある。検出部は、各スイッチに固有の複数の識別符号夫々と各入力端子からの複数の入力符号それぞれとの比較を並行に実行する。故に、複数の識別符号と各入力端子からの複数の入力符号を順に比較する場合に比べて、検出部は短時間でスイッチの開閉を検出できる。 In the present invention, a plurality of output terminals and input terminals are connected to the plurality of switches, respectively. The detection unit executes a comparison between each of the plurality of identification codes unique to each switch and the plurality of input codes from each input terminal in parallel. Therefore, the detection unit can detect the opening / closing of the switch in a short time as compared with the case where a plurality of identification codes and a plurality of input codes from each input terminal are sequentially compared.
本発明に係る開閉検出装置は、前記識別符号は二進数によって構成してあり、複数ビットを有し、前記入力符号を格納する入力レジスタを備え、前記検出部は、前記識別符号と前記入力レジスタに格納した入力符号を比較して、前記スイッチの開閉を検出する。 The open / close detection device according to the present invention includes an input register in which the identification code is composed of a binary number, has a plurality of bits, and stores the input code, and the detection unit includes the identification code and the input register. The opening / closing of the switch is detected by comparing the input codes stored in.
本発明においては、二進数の識別符号と入力符号を比較するので、検出部は識別符号と入力符号一致又は不一致を短時間で判定できる。 In the present invention, since the binary identification code and the input code are compared, the detection unit can determine the identification code and the input code match or mismatch in a short time.
本発明に係る開閉検出装置は、複数ビットを有する第二入力レジスタを備え、前記スイッチが閉じている場合、前記識別符号における1及び0のいずれの符号も格納可能な第一サンプリング周期で前記入力レジスタに前記入力符号を格納し、前記スイッチが閉じている場合、前記識別符号における1又0のいずれか一方を格納可能な第二サンプリング周期で前記第二入力レジスタに前記入力符号を格納する。 The open / close detection device according to the present invention includes a second input register having a plurality of bits, and when the switch is closed, the input has a first sampling cycle capable of storing any of 1 and 0 in the identification code. The input code is stored in the register, and when the switch is closed, the input code is stored in the second input register at a second sampling cycle capable of storing either 1 or 0 in the identification code.
本発明においては、識別符号全体のビット数よりも少ない連続した所定ビットにて、第二入力レジスタに格納した入力符号と予め定めたスイッチの開又は閉を示す符号との一致又は不一致を判定する。そのため、第一サンプリング周期で入力レジスタに格納した入力符号と識別符号の一致又は不一致を判定する場合に比べて、検出部は所定の信頼性をもってスイッチの開閉を短時間で検出できる。 In the present invention, it is determined that the input code stored in the second input register and the code indicating the opening or closing of the predetermined switch match or do not match with a continuous predetermined bit smaller than the total number of bits of the identification code. .. Therefore, the detection unit can detect the opening and closing of the switch in a short time with predetermined reliability as compared with the case of determining the match or mismatch between the input code and the identification code stored in the input register in the first sampling cycle.
本発明に係る工作機械は、スイッチと、該スイッチの開閉を検出する上述の開閉検出装置とを備える。 The machine tool according to the present invention includes a switch and the above-mentioned open / close detection device for detecting the open / close of the switch.
本発明においては、スイッチに対応した識別符号と入力符号の一致又は不一致に基づき、検出部はスイッチの開閉を検出する。チャタリングが発生している場合、識別符号と入力符号は不一致であり、検出部はスイッチの開を検出する。チャタリングが収束した場合、識別符号と入力符号は一致し、検出部は直ちにスイッチの閉を検出する。 In the present invention, the detection unit detects the opening / closing of the switch based on the match or mismatch between the identification code corresponding to the switch and the input code. When chattering has occurred, the identification code and the input code do not match, and the detection unit detects the opening of the switch. When the chattering converges, the identification code and the input code match, and the detection unit immediately detects that the switch is closed.
本発明に係る開閉検出装置及び工作機械にあっては、スイッチに対応した識別符号と入力符号の一致又は不一致に基づき、検出部はスイッチの開閉を検出する。チャタリングが発生している場合、識別符号と入力符号は不一致であり、検出部はスイッチの開を検出する。チャタリングが収束した場合、識別符号と入力符号は一致し、検出部は直ちにスイッチの閉を検出する。開閉検出装置はチャタリングの収束後直ちにスイッチの閉を検出する。また識別符号の長さは一定であり、識別符号と入力符号の一致又は不一致の判定に要する時間は長くならない。また開閉検出装置はローパスフィルタを使用する必要もない。故に開閉検出装置はスイッチの開又は閉を短時間で検出できる。 In the open / close detection device and machine tool according to the present invention, the detection unit detects the open / close of the switch based on the match or mismatch between the identification code and the input code corresponding to the switch. When chattering has occurred, the identification code and the input code do not match, and the detection unit detects the opening of the switch. When the chattering converges, the identification code and the input code match, and the detection unit immediately detects that the switch is closed. The open / close detector detects the closing of the switch immediately after the chattering converges. Further, the length of the identification code is constant, and the time required for determining the match or mismatch between the identification code and the input code is not long. Further, the open / close detection device does not need to use a low-pass filter. Therefore, the open / close detection device can detect the opening or closing of the switch in a short time.
(実施の形態1)
以下本発明を実施の形態1に係る開閉検出装置を示す図面に基づいて説明する。図1は、開閉検出装置を略示するブロック図である。開閉検出装置は基板20と、該基板20に実装したFPGA1(Field Programmable Gate Array)と、基板20及びスイッチ14を接続するコネクタ13とを備える。
(Embodiment 1)
Hereinafter, the present invention will be described with reference to the drawings showing the open / close detection device according to the first embodiment. FIG. 1 is a block diagram illustrating an open / close detection device. The open / close detection device includes a
FPGA1は、出力端子7、入力端子8、出力レジスタ2、入力レジスタ3、記憶部4、タイマ5、検出部6及び送信端子9を備える。出力端子7は、物理的に絶縁した信号変換器10及びFET11(Field Effect Transistor)を介してスイッチ14の一端部に接続している。入力端子8は、物理的に絶縁した信号変換器15及び増幅器16を介してスイッチ14の他端部に接続している。信号変換器10、15は、例えばフォトカプラを有する光アイソレータ、トランス・コイルを有するトランス・アイソレーション又はコンデンサを有する容量性アイソレーションである。信号変換器10、15は高電圧で動作するスイッチ14側領域と低電圧で動作するFPGA1側領域を絶縁する。
The
出力端子7はFET11のゲート11aに接続する。FET11のドレイン11bに電源12が接続する。FET11のソース11cはコネクタ13を介してスイッチ14の一端部に接続する。スイッチ14の他端部はコネクタ13及び信号変換器15を介して増幅器16の入力側に接続する。増幅器16の出力側は入力端子8に接続する。
The
出力レジスタ2及び入力レジスタ3は8ビットの符号を夫々格納する。出力レジスタ2及び入力レジスタ3は8ビット以外のビット数で符号を格納してもよい。記憶部4は、前記スイッチ14に対応した固有の識別符号を記憶する。タイマ5は、判定周期及びサンプリング周期を測定する。検出部6は、識別符号と入力レジスタ3に格納した入力符号とに基づき、スイッチ14の開閉を検出する。
The
図2は、出力レジスタ2からの符号の出力及び入力レジスタ3への符号の入力を説明する説明図である。FPGA1は、記憶部4に記憶した識別符号を出力レジスタ2に設定する。出力レジスタ2は出力端子7から識別符号を左から順に1ビットずつ出力し、図2の矢印に示す如く、FPGA1は出力レジスタ2を一つずつ左にシフトする。入力レジスタ3は入力端子8から右から順に符号を1ビットずつ順に入力し、図2の矢印に示す如く、FPGA1は入力レジスタ3を一つずつ左にシフトする。
FIG. 2 is an explanatory diagram illustrating the output of the code from the
出力レジスタ2から出力した識別符号は信号変換器10を介してFET11のゲート11aに入力し、ソース11cは識別符号を示す信号を出力する。スイッチ14が閉じている場合、識別符号を示す信号は信号変換器15及び増幅器16を介して入力端子8に入力する。入力レジスタ3は入力端子8に入力した信号、即ち入力符号を格納する。スイッチ14が開いている場合、識別符号は入力端子8に入力しない。
The identification code output from the
出力レジスタ2又はFET11等とは異なる構成、例えば別回路の電源を出力端子7に誤って接続した場合又は断線が生じている場合、スイッチ14の開閉に拘わらず、識別符号は入力端子8に入力しない。即ち、スイッチ14が開いている場合と同じ状態になる。
If the configuration is different from that of the
図3は、判定周期、識別符号、スイッチ14の開閉、入力信号、第一サンプリング周期及び入力符号を示すタイミングチャートである。図3において、最上段に示す判定周期の隣合う二つのパルスの間T1〜T3は判定周期を示す。識別符号、即ち出力信号は波形をなし、その上側は1を示し、下側は0を示す。スイッチ14の開閉は、上側が閉を示し、下側が開を示す。スイッチ14の開閉において、チャタリングが発生している部分を破線で示す。入力信号の上側は1を示し、下側は0を示す。t1〜t8は入力信号をサンプリングする時点を示し、隣合う時点間は第一サンプリング周期を示す。第一サンプリング周期は、識別符号における1及び0のいずれの符号も格納可能な周期である。各判定周期T1〜T3はサンプリング時点t1〜t8を含む。入力符号の上側は1を示し、下側は0を示す。
FIG. 3 is a timing chart showing a determination cycle, an identification code, opening / closing of a
図4は、スイッチ14の開閉を検出する開閉検出処理を説明するフローチャートである。FPGA1は記憶部4に記憶した8ビットの識別符号、例えば「10101100」を出力レジスタ2に格納し(ステップS1)、入力レジスタ3をクリアする(ステップS2)。FPGA1はタイマ5を参照し、前回の入力信号のサンプリング時点からサンプリング周期が経過するまで待機する(ステップS3:NO)。例えば、前回のサンプリング時点がt1である場合、時点t2までFPGA1は待機し、前回のサンプリング時点がt8である場合、次の判定周期の時点t1までFPGA1は待機する。サンプリング周期が経過した場合(ステップS3:YES)、FPGA1は出力レジスタ2から1ビットの信号を出力し(ステップS4)、入力レジスタ3に1ビットの入力信号を格納する(ステップS5)。
FIG. 4 is a flowchart illustrating an opening / closing detection process for detecting the opening / closing of the
FPGA1は判定周期が経過したか否か判定する(ステップS6)。判定周期が経過してない場合(ステップS6:NO)、FPGA1は出力レジスタ2を1ビット左にシフトし(ステップS7)、入力レジスタ3を1ビット左にシフトして(ステップS8、図2参照)、ステップS3に処理を戻す。
判定周期が経過した場合(ステップS6:YES)、検出部6は、入力レジスタ3に格納した入力符号が記憶部4に記憶した識別符号と一致するか否か判定する(ステップS9)。判定周期が経過した場合、各サンプリング時点t1〜t8において、入力レジスタ3は1ビットの入力信号を格納し、8ビットの入力符号を格納している。
When the determination cycle has elapsed (step S6: YES), the detection unit 6 determines whether or not the input code stored in the
入力符号が識別符号に一致する場合(ステップS9:YES)、検出部6はスイッチ14の閉を検出し、送信端子9から外部装置にスイッチ14の閉を示す信号を送信し(ステップS10)、ステップS3に処理を戻す。入力符号が識別符号に一致しない場合(ステップS9:NO)、検出部6はスイッチ14の開を検出し、送信端子9から外部装置にスイッチ14の開を示す信号を送信し(ステップS11)、ステップS3に処理を戻す。尚、誤った配線を行った場合、例えば別回路の電源を出力端子7に誤って接続した場合又は断線が生じている場合、識別符号は入力端子8に入力せず、入力符号が識別符号に一致しない(ステップS9:NO)。この場合も、検出部6はスイッチ14の開を検出し、送信端子9から外部装置にスイッチ14の開を示す信号を送信する(ステップS11)。スイッチ14の開を示す信号は、スイッチ14の開とみなす信号を含む。
When the input code matches the identification code (step S9: YES), the detection unit 6 detects the closing of the
判定周期T1において、スイッチ14は開いている。判定周期T1の各サンプリング時点t1〜t8において、入力信号は0である。入力レジスタ3は8ビットの入力符号「00000000」であり、識別符号「10101100」に一致しない。検出部6はスイッチ14の開を検出する。
In the determination cycle T1, the
判定周期T2において、スイッチ14は閉じ、チャタリングが発生している。判定周期T2の各サンプリング時点t1〜t8にて、FPGA1は入力信号をサンプリングし、入力レジスタ3は8ビットの入力符号「00101000」を格納する。入力符号は識別符号「10101100」に一致しない。検出部6はスイッチ14の開を検出する。スイッチ14が閉じ、チャタリングが発生している場合、検出部6はスイッチ14の開を検出する。なお判定周期はチャタリングが発生している時間よりも長い。
In the determination cycle T2, the
判定周期T3において、スイッチ14は閉じ、チャタリングは発生していない。判定周期T3の各サンプリング時点t1〜t8にて、FPGA1は入力信号をサンプリングし、入力レジスタ3は8ビットの入力符号「10101100」を格納する。入力符号は識別符号に一致し、検出部6はスイッチ14の閉を検出する。
In the determination cycle T3, the
実施の形態1に係る開閉検出装置にあっては、スイッチ14に対応した識別符号と入力符号の一致又は不一致に基づき、検出部6はスイッチ14の開閉を検出する。チャタリングが発生している場合、識別符号と入力符号は不一致であり、検出部6はスイッチ14の開を検出する。チャタリングが収束した場合、識別符号と入力符号は一致し、検出部6は直ちにスイッチ14の閉を検出する。開閉検出装置はチャタリングの収束後直ちにスイッチ14の閉を検出する。また識別符号の長さは一定であり、識別符号と入力符号の一致又は不一致の判定に要する時間は長くならない。また開閉検出装置はローパスフィルタを使用する必要もない。故に開閉検出装置はスイッチ14の開又は閉を短時間で検出できる。また誤配線又は断線が生じている場合も、スイッチ14は開いているとみなすので、安全性を高めることができる。
In the open / close detection device according to the first embodiment, the detection unit 6 detects the open / close of the
また二進数の識別符号と入力符号を比較するので、検出部6は識別符号と入力符号一致又は不一致を短時間で判定できる。またローパスフィルタを使用する必要がないので、ローパスフィルタの時定数を検討する必要がない。また単に出力端子7からパルス信号を出力し、出力したパルス信号を入力端子8に入力して、スイッチ14の開閉を検出する場合よりも、識別符号を使用するので、判定の信頼性が高い。
Further, since the binary identification code and the input code are compared, the detection unit 6 can determine the identification code and the input code match or mismatch in a short time. Moreover, since it is not necessary to use a low-pass filter, it is not necessary to consider the time constant of the low-pass filter. Further, since the identification code is used as compared with the case where the pulse signal is simply output from the
(実施の形態2)
以下本発明を実施の形態2に係る開閉検出装置を示す図面に基づいて説明する。図5は、開閉検出装置を略示するブロック図である。図5に示す如く、FPGA1は第一出力端子7(1)〜第n出力端子7(n)及び第一入力端子8(1)〜第n入力端子8(n)を備える。第一出力端子7(1)〜第n出力端子7(n)及び第一入力端子8(1)〜第n入力端子8(n)は第一スイッチ14(1)〜第nスイッチ14(n)に夫々接続する。即ち、第一出力端子7(1)及び第一入力端子8(1)は第一スイッチ14(1)に接続する。同様に、第n出力端子7(n)及び第n入力端子8(n)は第nスイッチ14(n)に接続する。図5において、信号変換器10、15、FET11、電源12、増幅器16の記載を省略する。
(Embodiment 2)
Hereinafter, the present invention will be described with reference to the drawings showing the open / close detection device according to the second embodiment. FIG. 5 is a block diagram illustrating an open / close detection device. As shown in FIG. 5, the
記憶部4は、第一スイッチ14(1)〜第nスイッチ14(n)夫々に固有のn個の識別符号を記憶する。識別符号が8ビットで構成してある場合、記憶部4は最大256個の固有の識別符号を記憶できる。 The storage unit 4 stores n identification codes unique to each of the first switch 14 (1) to the nth switch 14 (n). When the identification code is composed of 8 bits, the storage unit 4 can store up to 256 unique identification codes.
図6は、出力レジスタ2及び入力レジスタ3を略示するブロック図である。図6に示す如く、出力レジスタ2は、第一スイッチ14(1)〜第nスイッチ14(n)に対応した第一出力レジスタ部2(1)〜第n出力レジスタ部2(n)を備え、入力レジスタ3は、第一スイッチ14(1)〜第nスイッチ14(n)に対応した第一入力レジスタ部3(1)〜第n入力レジスタ部3(n)を備える。FPGA1は、第一スイッチ14(1)〜第nスイッチ14(n)夫々について、上述した開閉検出処理を並行に実行する。即ち、検出部6は第一入力レジスタ部3(1)〜第n入力レジスタ部3(n)夫々に格納した入力符号と、n個の識別符号夫々との比較を並行に実行する。
FIG. 6 is a block diagram illustrating the
単に第一出力端子7(1)〜第n出力端子7(n)から順にパルス信号を出力し、出力した各パルス信号を第一入力端子8(1)〜第n入力端子8(n)に順に入力して、第一スイッチ14(1)〜第nスイッチ14(n)全ての開閉を検出する場合、パルス信号の出力時点と次のパルス信号の出力時点の間に待ち時間が発生する。待ち時間は累積するので、開閉検出処理が終了するまでに長時間を要する。一方、実施の形態2の検出部6は第一入力レジスタ部3(1)〜第n入力レジスタ部3(n)夫々に格納した入力符号と、n個の識別符号との比較を並行に実行するので、各スイッチについて順に開閉を検出する場合に比べて、短時間で第一スイッチ14(1)〜第nスイッチ14(n)の開閉を検出できる。 The pulse signals are simply output from the first output terminal 7 (1) to the nth output terminal 7 (n), and each output pulse signal is sent to the first input terminal 8 (1) to the nth input terminal 8 (n). When inputting in order and detecting the opening / closing of all the first switch 14 (1) to the nth switch 14 (n), a waiting time occurs between the output time of the pulse signal and the output time of the next pulse signal. Since the waiting time is cumulative, it takes a long time to complete the open / close detection process. On the other hand, the detection unit 6 of the second embodiment compares the input codes stored in the first input register units 3 (1) to the nth input register units 3 (n) with the n identification codes in parallel. Therefore, the opening / closing of the first switch 14 (1) to the nth switch 14 (n) can be detected in a shorter time than in the case of detecting the opening / closing of each switch in order.
図7は、第一スイッチ14(1)を誤って第二入力端子8(2)に接続した開閉検出装置を略示するブロック図、図8は、第一スイッチ14(1)を誤って第二入力端子8(2)に接続した開閉検出装置における第一出力端子7(1)、第一入力端子8(1)、第二出力端子7(2)及び第二入力端子8(2)の信号波形の一例を示す図である。 FIG. 7 is a block diagram illustrating an open / close detection device in which the first switch 14 (1) is mistakenly connected to the second input terminal 8 (2), and FIG. 8 is a block diagram in which the first switch 14 (1) is mistakenly connected to the second input terminal 8 (2). Of the first output terminal 7 (1), the first input terminal 8 (1), the second output terminal 7 (2), and the second input terminal 8 (2) in the open / close detection device connected to the two input terminals 8 (2). It is a figure which shows an example of a signal waveform.
図7に示す如く、第一スイッチ14(1)を誤って第二入力端子8(2)に接続した場合、図8に示す如く、第一出力端子7(1)の出力信号は第一入力端子8(1)に入力せず、第二入力端子8(2)に入力する。故に、第一入力端子8(1)に入力した入力符号は、第一スイッチ14(1)に対応した識別符号、換言すれば第一出力端子7(1)の出力信号に一致しない。第二入力端子8(2)に入力した入力符号は、第二スイッチ14(2)に対応した識別符号、換言すれば第二出力端子7(2)の出力信号に一致しない。入力符号が一致しない各入力信号を比較することによって、ユーザは誤って接続した端子を特定することができる。 As shown in FIG. 7, when the first switch 14 (1) is mistakenly connected to the second input terminal 8 (2), the output signal of the first output terminal 7 (1) is the first input as shown in FIG. Do not input to terminal 8 (1), but input to second input terminal 8 (2). Therefore, the input code input to the first input terminal 8 (1) does not match the identification code corresponding to the first switch 14 (1), in other words, the output signal of the first output terminal 7 (1). The input code input to the second input terminal 8 (2) does not match the identification code corresponding to the second switch 14 (2), in other words, the output signal of the second output terminal 7 (2). By comparing each input signal whose input codes do not match, the user can identify the terminal connected incorrectly.
実施の形態2に係る開閉検出装置の構成の内、実施の形態1と同様な構成については同じ符号を付し、その詳細な説明を省略する。 Of the configurations of the open / close detection device according to the second embodiment, the same configurations as those of the first embodiment are designated by the same reference numerals, and detailed description thereof will be omitted.
(実施の形態3)
以下本発明を実施の形態3に係る開閉検出装置を示す図面に基づいて説明する。図9は、開閉検出装置を略示するブロック図である。開閉検出装置は、第二入力レジスタ30と、第二送信端子19とを備える。FPGA1は、識別符号における1及び0のいずれの符号も格納可能な第一サンプリング周期で入力レジスタ3に入力符号を格納する。FPGA1は、識別符号における1又0のいずれか一方を格納可能な第二サンプリング周期で第二入力レジスタ30に入力符号を格納する。以下、第二入力レジスタ30に格納した入力符号を第二入力符号と称する。
(Embodiment 3)
Hereinafter, the present invention will be described with reference to the drawings showing the open / close detection device according to the third embodiment. FIG. 9 is a block diagram illustrating an open / close detection device. The open / close detection device includes a second input register 30 and a
図10は、判定周期、識別符号、スイッチ14の開閉、入力信号、第一サンプリング周期、第二サンプリング周期、第二入力符号、入力符号、開閉信号を示すタイミングチャートである。図10に示す如く、k1〜k8は入力信号をサンプリングする時点を示し、最上段に示す判定周期の隣合う時点間は第二サンプリング周期を示す。各判定周期T1〜T3はサンプリング時点k1〜k8を含む。第二入力符号の上側は1を示し、下側は0を示す。開閉信号は、第二開閉検出処理によって、第二送信端子19が送信する開信号又は閉信号を示す。
FIG. 10 is a timing chart showing a determination cycle, an identification code, opening / closing of a
FPGA1は、サンプリング時点k1〜k8において、入力信号をサンプリングし、第二入力レジスタ30に格納する。図10に示す如く、スイッチ14が閉じている場合、例えば判定周期T3におけるサンプリング時点k1〜k8において、FPGA1は、識別符号の1のみを第二入力レジスタ30に格納することができ、識別符号の0を第二入力レジスタ30に格納することができない。換言すれば、出力端子7は、サンプリング時点k1〜k8において1となるような波形で出力信号、即ち識別符号を出力する。出力信号の波形がサンプリング時点k1〜k8において0となる場合、チャタリングが発生している。
The
図11は、スイッチ14の開閉を検出する開閉検出処理を説明するフローチャートである。FPGA1は記憶部4に記憶した8ビットの識別符号、例えば「10101100」を出力レジスタ2に格納し(ステップS21)、入力レジスタ3をクリアする(ステップS22)。FPGA1はタイマ5を参照し、前回の入力信号のサンプリング時点からサンプリング周期が経過するまで待機する(ステップS23:NO)。サンプリング周期が経過した場合(ステップS23:YES)、FPGA1は出力レジスタ2から1ビットの信号を出力し(ステップS24)、入力レジスタ3に1ビットの入力信号を格納する(ステップS25)。
FIG. 11 is a flowchart illustrating an opening / closing detection process for detecting the opening / closing of the
FPGA1はタイマ5を参照し、前回の入力信号の第二サンプリング時点から第二サンプリング周期が経過するまで待機する(ステップS26:NO)。第二サンプリング周期が経過した場合(ステップS26:YES)、FPGA1は第二入力レジスタ30に1ビットの入力信号を格納する(ステップS27)。なお第二入力レジスタ30は入力レジスタ3と同様に8ビットの符号を格納し、1ビットの入力信号、即ち符号を格納する都度、左にシフトする(図2参照)。第二入力レジスタ30は8ビット以外のビット数で符号を格納してもよい。
The
FPGA1は判定周期が経過したか否か判定する(ステップS28)。判定周期が経過してない場合(ステップS28:NO)、FPGA1は出力レジスタ2を1ビット左にシフトし(ステップS29)、入力レジスタ3を1ビット左にシフトして(ステップS30、図2参照)、ステップS23に処理を戻す。
判定周期が経過した場合(ステップS28:YES)、検出部6は、入力レジスタ3に格納した入力符号が記憶部4に記憶した識別符号と一致するか否か判定する(ステップS31)。判定周期が経過した場合、各サンプリング時点t1〜t8において、入力レジスタ3は1ビットの入力信号を格納し、8ビットの入力符号を格納している。
When the determination cycle has elapsed (step S28: YES), the detection unit 6 determines whether or not the input code stored in the
入力符号が識別符号に一致する場合(ステップS31:YES)、検出部6はスイッチ14の閉を検出し、送信端子9から外部装置にスイッチ14の閉を示す信号を送信し(ステップS32)、ステップS23に処理を戻す。入力符号が識別符号に一致しない場合(ステップS31:NO)、検出部6はスイッチ14の開を検出し、送信端子9から外部装置にスイッチ14の開を示す信号を送信し(ステップS33)、ステップS23に処理を戻す。
When the input code matches the identification code (step S31: YES), the detection unit 6 detects the closing of the
図12は、スイッチ14の開閉を検出する第二開閉検出処理を説明するフローチャートである。FPGA1は、開閉検出処理とは別ルーチンで第二開閉検出処理を実行する。FPGA1の検出部6は、第二入力レジスタ30を読み込み(ステップS41)、右側4ビット、即ち下位4ビットが1111であるか否か判定する(ステップS42)。なお前述のステップS27において、FPGA1は第二入力レジスタ30に入力信号を格納している。下位4ビットが1111である場合(ステップS42:YES)、検出部6は第二送信端子19から外部装置にスイッチ14の閉を示す信号を送信し(ステップS43)、ステップS41に処理を戻す。
FIG. 12 is a flowchart illustrating a second open / close detection process for detecting the open / close of the
下位4ビットが1111でない場合(ステップS42:NO)、検出部6は、下位4ビットが0000であるか否か判定する(ステップS44)。下位4ビットが0000である場合(ステップS44:YES)、検出部6は第二送信端子19から外部装置にスイッチ14の開を示す信号を送信し(ステップS45)、ステップS41に処理を戻す。下位4ビットが0000でない場合(ステップS44:NO)、検出部6はステップS41に処理を戻す。
When the lower 4 bits are not 1111 (step S42: NO), the detection unit 6 determines whether or not the lower 4 bits are 0000 (step S44). When the lower 4 bits are 0000 (step S44: YES), the detection unit 6 transmits a signal indicating the opening of the
判定周期T1において、スイッチ14は開いている。判定周期T1の各サンプリング時点k1〜k8において、入力信号は全て0である。第二入力レジスタ30の下位4ビットの入力符号は「0000」であり(ステップS44:YES)、検出部6はスイッチ14の開を検出する(ステップS45)。
In the determination cycle T1, the
判定周期T2において、スイッチ14は閉じ、チャタリングが発生している。判定周期T2の各サンプリング時点k1〜k8にて、FPGA1は入力信号をサンプリングし、第二入力レジスタ30に入力符号を格納する。時点k1〜k4にて、第二入力符号は「0010」であり、0及び1を含む(ステップS42:NO、ステップS44:NO)。時点k5〜k8にて、第二入力符号は「1111」である(ステップS42:YES)。判定周期T2のサンプリング時点k8において、第二入力レジスタ30の下位4ビットに「1111」が格納され、検出部6はスイッチ14の閉を検出する(ステップS43)。
In the determination cycle T2, the
スイッチ14が閉じ、チャタリングが発生している間、検出部6はスイッチ14の開閉を検出しない。チャタリングが収束した場合、検出部6はスイッチ14の閉を検出する。判定周期T2の間に、検出部6はスイッチ14の開閉を複数回判断できるので、判定周期の経過後に判断する場合よりも、検出部6はスイッチ14の開閉を早く検出できる。
While the
判定周期T3において、スイッチ14は閉じ、チャタリングは発生していない。判定周期T3の各サンプリング時点k1〜k8にて、FPGA1は入力信号をサンプリングし、第二入力レジスタ30の下位4ビットに入力符号「1111」を格納する(ステップS42:YES)。検出部6はスイッチ14の閉を検出する(ステップS43)。
In the determination cycle T3, the
なお第二開閉検出処理において、第二入力レジスタ30の下位4ビットに基づいて、スイッチ14の開閉を検出しているが、下位3ビット以下又は下位5ビット以上に基づいて、スイッチ14の開閉を検出してもよい。
In the second open / close detection process, the open / close of the
実施の形態3に係る開閉検出装置にあっては、識別符号全体のビット数よりも少ない連続した所定ビットにて、第二入力レジスタ30に格納した入力符号と予め定めたスイッチ14の開又は閉を示す符号との一致又は不一致を判定する。そのため、第一サンプリング周期で入力レジスタ3に格納した入力符号と識別符号の一致又は不一致を判定する場合に比べて、検出部6は所定の信頼性をもってスイッチ14の開閉を短時間で検出できる。
In the open / close detection device according to the third embodiment, the input code stored in the second input register 30 and the
開閉検出装置は外部機器に設ける。例えばスイッチ14が開の場合、外部機器は停止し、閉の場合、外部機器は動作する。安全の為には、スイッチ14の開の検出よりも、閉の検出が重要である。外部機器が動作するスイッチ14の閉の検出は、第一サンプリング周期で入力レジスタ3に格納した入力符号と識別符号の一致によって、確実に行う。
The open / close detection device is installed in an external device. For example, when the
一方、外部機器の動作に関係しない場合、例えば制御プログラムにおいてエラーの判定を行う場合、又は警告を出す場合には、スイッチ14の開閉を短時間で検出することが望ましい。この場合、より少ない連続した所定ビットにて、第二サンプリング周期で第二入力レジスタ30に格納した入力符号と予め定めたスイッチ14の開又は閉を示す符号との一致又は不一致を判定する。検出部6は所定の信頼性をもってスイッチ14の開閉を短時間で検出できる。
On the other hand, it is desirable to detect the opening and closing of the
実施の形態3に係る開閉検出装置の構成の内、実施の形態1又は2と同様な構成については同じ符号を付し、その詳細な説明を省略する。 Among the configurations of the open / close detection device according to the third embodiment, the same components as those of the first or second embodiment are designated by the same reference numerals, and detailed description thereof will be omitted.
上述した開閉検出装置は、例えば主軸、ワーク保持部、制御装置及び緊急停止スイッチを備える工作機械に設ける。開閉検出装置は緊急停止スイッチの開閉を検出する。緊急停止スイッチが閉じ、第一サンプリング周期で入力レジスタ3に格納した入力符号と識別符号が一致し、開閉検出装置が閉を検出した場合、制御装置は主軸及びワーク保持部を停止する。制御装置は停止実行装置として機能する。開閉検出装置が開を検出した場合、停止実行装置は停止し、閉を検出した場合、停止実行装置は動作する。
The above-mentioned open / close detection device is provided on a machine tool including, for example, a spindle, a work holding unit, a control device, and an emergency stop switch. The open / close detection device detects the open / close of the emergency stop switch. When the emergency stop switch closes, the input code stored in the
緊急停止スイッチが閉じ、第二入力レジスタ30に格納した入力符号がスイッチ14の閉を示す符号に一致し、開閉検出装置が閉を検出した場合、制御装置は、例えば制御プログラムにおいてエラーの判定を行うか又は警告を出す。なお開閉検出装置は緊急停止スイッチ以外のスイッチ、例えば工作機械の表示部の画面切替スイッチ、ワーク保持部へのワークの着脱を行う時に開閉する扉に設けたリミットスイッチの開閉を検出してもよい。
When the emergency stop switch is closed, the input code stored in the second input register 30 matches the code indicating the closing of the
今回開示した実施の形態は、全ての点で例示であって、制限的なものではないと考えられるべきである。各実施例にて記載されている技術的特徴は互いに組み合わせることができ、本発明の範囲は、特許請求の範囲内での全ての変更及び特許請求の範囲と均等の範囲が含まれることが意図される。 The embodiments disclosed this time should be considered to be exemplary in all respects and not restrictive. The technical features described in each example can be combined with each other and the scope of the invention is intended to include all modifications within the claims and scope equivalent to the claims. Will be done.
1 FPGA
3 入力レジスタ
4 記憶部
6 検出部
7 出力端子
7(1)〜7(n) 第一出力端子〜第n出力端子
8 入力端子
8(1)〜8(n) 第一入力端子〜第n入力端子
14 スイッチ
14(1)〜14(n) 第一スイッチ〜第nスイッチ
30 第二入力レジスタ
1 FPGA
3 Input register 4 Storage unit 6
Claims (5)
前記スイッチに対応した識別符号を記憶した記憶部を備え、
前記出力端子は前記識別符号を示す信号を出力し、
前記検出部は、前記入力信号が示す入力符号が前記識別符号と一致する場合、前記スイッチの閉を検出し、前記入力信号が示す入力符号が前記識別符号と不一致である場合、前記スイッチの開を検出する
開閉検出装置。 An open / close detection device including an output terminal that outputs a signal, an input terminal connected to the output terminal via a switch, and a detection unit that detects the open / close of the switch based on the input signal from the input terminal.
A storage unit that stores an identification code corresponding to the switch is provided.
The output terminal outputs a signal indicating the identification code, and outputs a signal indicating the identification code.
The detection unit detects the closing of the switch when the input code indicated by the input signal matches the identification code, and opens the switch when the input code indicated by the input signal does not match the identification code. Open / close detection device that detects.
複数の前記出力端子及び入力端子は複数の前記スイッチを介して夫々接続してあり、
各スイッチに固有の複数の前記識別符号を前記記憶部は記憶しており、
前記検出部は前記複数の識別符号夫々と複数の前記入力符号夫々との比較を並行に実行する
請求項1に記載の開閉検出装置。 A plurality of output terminals and input terminals are provided, respectively.
The plurality of output terminals and input terminals are connected to each other via the plurality of switches.
The storage unit stores a plurality of the identification codes unique to each switch.
The open / close detection device according to claim 1, wherein the detection unit performs comparison between the plurality of identification codes and the plurality of input codes in parallel.
複数ビットを有し、前記入力符号を格納する入力レジスタを備え、
前記検出部は、前記識別符号と前記入力レジスタに格納した入力符号を比較して、前記スイッチの開閉を検出する
請求項1又は2に記載の開閉検出装置。 The identification code is composed of binary numbers.
It has a plurality of bits and has an input register for storing the input code.
The opening / closing detection device according to claim 1 or 2, wherein the detection unit compares the identification code with the input code stored in the input register to detect the opening / closing of the switch.
前記スイッチが閉じている場合、前記識別符号における1及び0のいずれの符号も格納可能な第一サンプリング周期で前記入力レジスタに前記入力符号を格納し、
前記スイッチが閉じている場合、前記識別符号における1又0のいずれか一方を格納可能な第二サンプリング周期で前記第二入力レジスタに前記入力符号を格納し、
前記識別符号全体のビット数よりも少ない連続した所定ビットにて、前記第二入力レジスタに格納した入力符号と予め定めた前記スイッチの開又は閉を示す符号との一致又は不一致を判定し、前記スイッチの開閉を検出する
請求項3に記載の開閉検出装置。 It has a second input register with multiple bits
When the switch is closed, the input code is stored in the input register in the first sampling cycle in which both the codes 1 and 0 in the identification code can be stored.
When the switch is closed, the input code is stored in the second input register at a second sampling cycle capable of storing either 1 or 0 in the identification code.
With consecutive predetermined bits smaller than the total number of bits of the identification code, it is determined whether or not the input code stored in the second input register matches or does not match the predetermined code indicating the opening or closing of the switch. The open / close detection device according to claim 3, which detects the open / close of a switch.
該スイッチの開閉を検出する請求項1から4のいずれか一つに記載の開閉検出装置と
を備える工作機械。 A switch that opens the contacts in a safe state and closes the contacts in other states,
A machine tool including the open / close detection device according to any one of claims 1 to 4, which detects the open / close of the switch.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017144611A JP6801598B2 (en) | 2017-07-26 | 2017-07-26 | Open / close detection device and machine tools |
| CN201810836015.XA CN109308034B (en) | 2017-07-26 | 2018-07-26 | Opening/closing detection device and machine tool |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017144611A JP6801598B2 (en) | 2017-07-26 | 2017-07-26 | Open / close detection device and machine tools |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019029095A JP2019029095A (en) | 2019-02-21 |
| JP6801598B2 true JP6801598B2 (en) | 2020-12-16 |
Family
ID=65225998
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017144611A Active JP6801598B2 (en) | 2017-07-26 | 2017-07-26 | Open / close detection device and machine tools |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP6801598B2 (en) |
| CN (1) | CN109308034B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7484538B2 (en) * | 2020-07-31 | 2024-05-16 | ブラザー工業株式会社 | Condition determination system and machine tool |
| JP7694357B2 (en) * | 2021-11-22 | 2025-06-18 | 東京電力ホールディングス株式会社 | Circuit breaker status diagnosis device, circuit breaker status diagnosis method, and program |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH04132414A (en) * | 1990-09-25 | 1992-05-06 | Nec Corp | Prevention circuit for unstable setting |
| JP3682497B2 (en) * | 2001-01-31 | 2005-08-10 | 村田機械株式会社 | Image forming apparatus |
| JP4728823B2 (en) * | 2006-02-06 | 2011-07-20 | 株式会社北電子 | Input signal processing apparatus, game hall management system, input signal processing method, and input signal processing program |
| JP2011095949A (en) * | 2009-10-29 | 2011-05-12 | Sanyo Electric Co Ltd | Input device |
| JP5627428B2 (en) * | 2010-12-08 | 2014-11-19 | 矢崎総業株式会社 | ON / OFF judgment device for contact switch |
| JP6557086B2 (en) * | 2015-07-31 | 2019-08-07 | ファナック株式会社 | Control device with rotary switch |
-
2017
- 2017-07-26 JP JP2017144611A patent/JP6801598B2/en active Active
-
2018
- 2018-07-26 CN CN201810836015.XA patent/CN109308034B/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019029095A (en) | 2019-02-21 |
| CN109308034A (en) | 2019-02-05 |
| CN109308034B (en) | 2021-12-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2007164765A (en) | IIC bus communication system, slave device, and IIC bus communication control method | |
| US20100100799A1 (en) | Fault detection apparatus, fault detection method, and fault detection program | |
| JP6801598B2 (en) | Open / close detection device and machine tools | |
| CN110612453A (en) | Wire break detection in digital input receivers | |
| USRE50428E1 (en) | Input module of industrial control apparatus | |
| CN205027875U (en) | Digital circuit failure detector circuit | |
| EP3435100B1 (en) | Method for testing an electronic device and an interface circuit therefore | |
| CN115116385B (en) | Display system and display control method thereof | |
| JP2009175092A (en) | Disconnection detector | |
| TW201626183A (en) | Touch panel and method for detecting the same | |
| KR20180108497A (en) | Monitoring circuit | |
| KR101447221B1 (en) | Chip applied to serial transmission system and associated fail safe method | |
| KR100442625B1 (en) | Apparatus and method for controlling the malfunction of hall effect switch used for sensing open or close of the flip or polder of terminal equipment | |
| US20070038403A1 (en) | Electronic circuit, system with an electronic circuit and method for testing an electronic circuit | |
| CN109901513A (en) | Switching device and numerical control system with dual switching signal generating unit | |
| KR101919139B1 (en) | Security control apparatus and method thereof | |
| JP2020145356A (en) | Integrated circuit equipment | |
| RU2642397C2 (en) | Device for monitoring electrical installation | |
| JP7596867B2 (en) | Switch system and switch | |
| KR20120083458A (en) | Method for operating an electromechanical converter system and electromechanical converter system | |
| JP2006301041A (en) | Switch circuit and image forming apparatus | |
| KR20010088102A (en) | Abnormality power source sensing apparatus and method for programmable logic controller | |
| KR200146210Y1 (en) | Fire detection circuit | |
| KR20170042242A (en) | Nonvolatile memory device | |
| CN110389539A (en) | Safety switch |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200218 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20201019 |
|
| 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: 20201027 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201109 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6801598 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |