JP6800727B2 - Measurement system - Google Patents

Measurement system Download PDF

Info

Publication number
JP6800727B2
JP6800727B2 JP2016239032A JP2016239032A JP6800727B2 JP 6800727 B2 JP6800727 B2 JP 6800727B2 JP 2016239032 A JP2016239032 A JP 2016239032A JP 2016239032 A JP2016239032 A JP 2016239032A JP 6800727 B2 JP6800727 B2 JP 6800727B2
Authority
JP
Japan
Prior art keywords
data
bytes
measurement
adapter
measurement data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016239032A
Other languages
Japanese (ja)
Other versions
JP2018097445A (en
Inventor
高久 正和
正和 高久
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tokyo Seimitsu Co Ltd
Original Assignee
Tokyo Seimitsu Co Ltd
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 Tokyo Seimitsu Co Ltd filed Critical Tokyo Seimitsu Co Ltd
Priority to JP2016239032A priority Critical patent/JP6800727B2/en
Publication of JP2018097445A publication Critical patent/JP2018097445A/en
Application granted granted Critical
Publication of JP6800727B2 publication Critical patent/JP6800727B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Arrangements For Transmission Of Measured Signals (AREA)

Description

本発明は、マシニングセンタをはじめとする工作機械等で使用される測定器からの測定データをパーソナルコンピュータ(以下PC)へ送信する測定システムに関する。 The present invention relates to a measurement system that transmits measurement data from a measuring instrument used in a machine tool such as a machining center to a personal computer (hereinafter referred to as a PC).

近年、工作機械あるいは測定工具等でワーク(加工対象物、測定対象物)を測定し、その測定値をUSB(Universal Serial Bus)通信によってWINDOWS(登録商標)などのOS(オペレーティング・システム)を搭載するPCに取り込むことが行われている。WINDOWS(登録商標)を搭載したPCでは、通常の機能に対してはCPUやバスのパワーなどで見かけ上、リアルタイム性のある用途でも利用できるようになってはいるが、リアルタイム処理に適してはいない。 In recent years, a work (machined object, measured object) is measured with a machine tool or a measuring tool, and the measured value is equipped with an OS (operating system) such as WINDOWS (registered trademark) by USB (Universal Serial Bus) communication. It is being imported into a PC. PCs equipped with WINDOWS (registered trademark) can be used for real-time processing by apparently using the power of the CPU and bus for normal functions, but they are not suitable for real-time processing. Not in.

リアルタイム性とは、「限られた時間内に確実に処理を実行できる」であり、WINDOWS(登録商標)では、どんなに高速なCPUを用いてもリアルタイム性を保障していない。したがって、WINDOWS(登録商標)を搭載したPCで動作するプログラム(以下WINDOWSプログラム)では、精密な時間管理ができない。 Real-time performance means that "processing can be reliably executed within a limited time", and WINDOWS (registered trademark) does not guarantee real-time performance even if a high-speed CPU is used. Therefore, a program (hereinafter referred to as a WINDOWS program) that operates on a PC equipped with WINDOWS (registered trademark) cannot perform precise time management.

等間隔にデータ送信要求をするようなWINDOWSプログラムを動作させたとしても、実際には、かなりの時間のばらつきが発生したり、予定の時間を大きく越えた動作をしたりすることが発生する。特に、測定値の取り込みと同時に、統計ソフト、編集ソフト等他のWINDOWSプログラムを動作させている場合は、このことが顕著となる。 Even if a WINDOWS program that requests data transmission at equal intervals is operated, in reality, a considerable time variation may occur, or an operation that greatly exceeds the scheduled time may occur. In particular, this becomes remarkable when another WINDOWS program such as statistical software or editing software is operated at the same time as the measurement value is taken in.

マシニングセンタ等では、ワークの加工途中や一応の加工処理が終了した時点でワークの測定を行うことがあるが、測定値の時間的な変化量が大きいと正確な測定が困難となる。そこで、測定器で等間隔にサンプリングした測定値を、WINDOWS(登録商標)を搭載したPCへ送り続けるには、測定器側にメモリを搭載し、そこに一時的にデータを格納する等の措置が必要となる。 In a machining center or the like, the work may be measured during the machining of the work or at the end of the machining process, but if the amount of change in the measured value over time is large, accurate measurement becomes difficult. Therefore, in order to continue sending the measured values sampled at equal intervals by the measuring instrument to the PC equipped with WINDOWS (registered trademark), measures such as installing a memory on the measuring instrument side and temporarily storing the data there. Is required.

また、データロガーとPCをUSBケーブルで接続してデータロガーとPCの通信速度を速くしている。また、センサの出力信号をメモリに記憶し、DMA(Direct Memory Access)でPCへ出力することが、特許文献1に記載されている。 In addition, the data logger and the PC are connected with a USB cable to increase the communication speed between the data logger and the PC. Further, Patent Document 1 describes that the output signal of the sensor is stored in a memory and output to a PC by DMA (Direct Memory Access).

特開2006−105950号公報Japanese Unexamined Patent Publication No. 2006-105950

上記従来技術において、高価な不揮発性メモリを必要とし、測定し続ける時間が長くなるほど、大きなメモリが必要となる。そのため、測定器側のサイズやコストがアップするので、高頻度での測定値の送信には向いていない。また、USB通信では、測定器(デバイス)側からの能動的な通信はできないので、測定器からデータを送る場合は、PC(ホスト)側からのデータ送信要求に続いてのみ、固定長データを送ることになる。 In the above-mentioned prior art, an expensive non-volatile memory is required, and the longer the measurement is continued, the larger the memory is required. Therefore, the size and cost of the measuring instrument increase, so that it is not suitable for transmitting measured values with high frequency. Also, in USB communication, active communication from the measuring instrument (device) side is not possible, so when sending data from the measuring instrument, fixed length data is sent only following the data transmission request from the PC (host) side. Will be sent.

したがって、PC側から測定器側へのデータ送信要求(および測定器側からのデータ送信)を立て続けに行ったとしても、送信要求の間隔限界(PCからコンスタントに立て続けに送信要求できる間隔の限界)がある。また、プログラムでの処理や、並列して動作している他のプログラムの状態によっては、送信要求の間隔限界がさらに伸びることとなる。 Therefore, even if data transmission requests from the PC side to the measuring instrument side (and data transmission from the measuring instrument side) are made in quick succession, the interval limit of the transmission request (the limit of the interval at which the PC can constantly make continuous transmission requests). There is. Further, depending on the processing in the program and the state of other programs operating in parallel, the interval limit of the transmission request may be further extended.

本発明の目的は、上記従来技術の課題を解決し、大きなメモリ等を測定器側に搭載することなく、精密に時間管理されたデータを送信要求の間隔に係わらず、WINDOWS(登録商標)搭載PCで簡単に取り込むことができる測定システムを得ることにある。 An object of the present invention is to solve the above-mentioned problems of the prior art, and to install WINDOWS (registered trademark) for precisely time-controlled data regardless of the interval of transmission request without installing a large memory or the like on the measuring instrument side. The purpose is to obtain a measurement system that can be easily captured by a PC.

上記目的を達成するため、本発明は、測定器からの測定データをUSB通信によりパーソナルコンピュータへ送信するための測定システムにおいて、前記測定器と接続され、前記測定データを指定間隔で時間管理して順次取得して、その取得回数とともに保存するアダプタと、該アダプタと前記パーソナルコンピュータとをUSB通信が可能なように接続するための手段と、を備え、前記アダプタは、前記USB通信におけるデータ送信領域の容量を有したデータ用メモリに複数回分の前記測定データを保存できるデータ領域と、前記取得回数を示す回数データを保存する回数領域と、を有し、前記パーソナルコンピュータからデータ送信要求が来た場合、前記測定データと、前記回数データと、を前記データ送信領域にセットして、前記パーソナルコンピュータへ送信するものである。 In order to achieve the above object, the present invention is a measurement system for transmitting measurement data from a measuring instrument to a personal computer by USB communication, which is connected to the measuring instrument and manages the measured data for a specified time at specified intervals. The adapter includes an adapter that sequentially acquires and saves the data together with the number of acquisitions, and a means for connecting the adapter and the personal computer so that USB communication is possible, and the adapter is a data transmission area in the USB communication. A data transmission request comes from the personal computer, which has a data area capable of storing the measurement data for a plurality of times in a data memory having the capacity of the above and a number area for storing the number-of-times data indicating the number of acquisitions. In this case, the measurement data and the number of times data are set in the data transmission area and transmitted to the personal computer.

また、上記の測定システムにおいて、前記パーソナルコンピュータを更に備え、前記測定データのバイト数をMバイト、前記回数データのバイト数をCバイトとして、前記パーソナルコンピュータは、前記アダプタから送信された前記回数データが(前記データ送信領域のバイト数−C)/M以下の場合、等間隔に時間管理された測定データであると判断することが望ましい。 Further, in the above measurement system, the personal computer is further provided, the number of bytes of the measurement data is M bytes, the number of bytes of the number of times data is C bytes, and the personal computer is the number of times data transmitted from the adapter. When is (the number of bytes of the data transmission area −C) / M or less, it is desirable to judge that the measurement data is time-controlled at equal intervals.

さらに、上記の測定システムにおいて、前記測定データのバイト数をMバイト、前記回数データのバイト数をCバイトとして、前記アダプタは、前記回数データが(前記データ送信領域のバイト数−C)/Mに達した場合、前記データ領域に保存された一番古い前記測定データを消して、該データ領域に最新の測定データを格納することが望ましい。 Further, in the above measurement system, the number of bytes of the measurement data is M bytes, the number of bytes of the number of times data is C bytes, and the number of times data is (number of bytes of the data transmission area −C) / M in the adapter. When is reached, it is desirable to erase the oldest measurement data stored in the data area and store the latest measurement data in the data area.

さらに、上記の測定システムにおいて、前記測定データのバイト数を2バイト、前記回数データのバイト数を2バイト、前記データ送信領域のバイト数を64バイトとして、前記アダプタは、64バイトのデータ用メモリに31回分の前記測定データを保存できる前記データ領域と、前記回数データを保存する回数領域と、を有することが望ましい。 Further, in the above measurement system, the number of bytes of the measurement data is 2 bytes, the number of bytes of the number of times data is 2 bytes, the number of bytes of the data transmission area is 64 bytes, and the adapter has 64 bytes of data memory. It is desirable to have the data area capable of storing the measurement data for 31 times and the number area for storing the number of times data.

さらに、上記の測定システムにおいて、前記パーソナルコンピュータを更に備え、前記測定データのバイト数を2バイト、前記回数データのバイト数を2バイト、前記データ送信領域のバイト数を64バイトとして、前記パーソナルコンピュータは、前記アダプタから送信された前記回数データが31以下の場合、等間隔に時間管理された測定データであると判断することが望ましい。 Further, in the above measurement system, the personal computer is further provided, the number of bytes of the measurement data is 2 bytes, the number of bytes of the number of times data is 2 bytes, and the number of bytes of the data transmission area is 64 bytes. When the number of times data transmitted from the adapter is 31 or less, it is desirable to determine that the measurement data is time-controlled at equal intervals.

さらに、上記の測定システムにおいて、前記測定データのバイト数を2バイト、前記回数データのバイト数を2バイト、前記データ送信領域のバイト数を64バイトとして、前記アダプタは、前記回数データが31に達した場合、前記データ領域に保存された一番古い前記測定データを消して、該データ領域に最新の測定データを格納することが望ましい。 Further, in the above measurement system, the number of bytes of the measurement data is 2 bytes, the number of bytes of the number of times data is 2 bytes, the number of bytes of the data transmission area is 64 bytes, and the number of times data of the adapter is 31. When it reaches, it is desirable to erase the oldest measurement data stored in the data area and store the latest measurement data in the data area.

さらに、上記の測定システムにおいて、前記アダプタは、前記測定データと、前記回数データと、を前記データ送信領域にセットして、前記パーソナルコンピュータへ送信した後、送信した前記測定データ及び前記回数データをクリアすることが望ましい。 Further, in the above measurement system, the adapter sets the measurement data and the number of times data in the data transmission area, transmits the measurement data to the personal computer, and then transmits the measurement data and the number of times data. It is desirable to clear it.

さらに、上記の測定システムにおいて、前記アダプタは、複数台の前記測定器と接続され、それぞれの前記測定データを指定間隔で時間管理して順次取得して保存することが望ましい。 Further, in the above measurement system, it is desirable that the adapter is connected to a plurality of the measuring instruments, and the measurement data of each is time-managed at specified intervals and sequentially acquired and stored.

本発明によれば、アダプタは、USB通信におけるデータ送信領域の容量を有したデータ用メモリに複数回分の測定データを保存できるデータ領域と、回数データを保存する回数領域と、を有し、測定データを指定間隔で順次取得して保存すると共に、PCからデータ送信要求が来た場合、測定データと、回数データと、をデータ送信領域にセットして、PCへ送信するので、必要最小限のメモリ容量で、精密に時間管理された測定データを送信要求の間隔に係わらず、WINDOWS(登録商標)搭載PCで簡単に取り込むことができる。 According to the present invention, the adapter has a data area capable of storing a plurality of measurement data in a data memory having a capacity of a data transmission area in USB communication, and a number area for storing the number of times data, and measures the data. Data is sequentially acquired and saved at specified intervals, and when a data transmission request comes from the PC, the measurement data and the number of times data are set in the data transmission area and transmitted to the PC, so the minimum required. With the memory capacity, precisely time-controlled measurement data can be easily captured by a WINDOWS (registered trademark) -equipped PC regardless of the transmission request interval.

本発明による一実施の形態に係る測定システムのブロック図Block diagram of the measurement system according to the embodiment according to the present invention 本発明による他の実施の形態に係る測定システムのブロック図Block diagram of the measurement system according to another embodiment according to the present invention. 本発明の一実施の形態によるアダプタに搭載するデータ用メモリのデータ領域を示す説明図Explanatory drawing which shows the data area of the data memory mounted on the adapter by one Embodiment of this invention. 一実施の形態における測定側のフローチャートFlow chart on the measurement side in one embodiment 一実施形態におけるPC側のフローチャートFlow chart on the PC side in one embodiment

以下に、本発明の実施形態について図面を参照して詳細に説明する。図1は、本発明による一実施形態の測定システムのブロック図で、測定システムは、センサ2とアダプタ1とWINDOWS(登録商標)搭載のPC4とからなる。アダプタ1は、該アダプタ1とPC4とをUSB通信が可能なように接続するための手段であるUSBケーブル3でホスト側となるPC4のUSBポートと、あるいは別途、電源供給が可能なUSBハブ(図示せず)と接続される。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram of a measurement system according to an embodiment of the present invention. The measurement system includes a sensor 2, an adapter 1, and a PC 4 equipped with WINDOWS (registered trademark). The adapter 1 is a USB port of the PC 4 on the host side with a USB cable 3 which is a means for connecting the adapter 1 and the PC 4 so that USB communication is possible, or a USB hub (separately) capable of supplying power. (Not shown) is connected.

もちろん、アダプタ1にアダプタ1とPC4とをUSB通信が可能なように接続するための手段としてUSBコネクタを設け、PC4のUSBポートへ直接接続する形式としても良い。センサ2とアダプタ1とはコネクタ5で接続され、ホスト側から電源供給及び通信が可能とされる。アダプタ1とPC4はUSB通信によって高速通信が行われる。 Of course, the adapter 1 may be provided with a USB connector as a means for connecting the adapter 1 and the PC 4 so that USB communication is possible, and may be directly connected to the USB port of the PC 4. The sensor 2 and the adapter 1 are connected by a connector 5, and power can be supplied and communication can be performed from the host side. High-speed communication is performed between the adapter 1 and the PC 4 by USB communication.

なお、マシニングセンタなどでは、ワークの寸法を測定するプローブをセンサ2として、可動の主軸へ装着している。その測定データをシリアルバイナリデータの個別のパッケージを送るスペクトル拡散無線リンクによって、マシニングセンタの固定部である機械ステーションへ無線通信により送信する。この場合は、機械ステーションをアダプタ1へ接続してPC4へUSBケーブル3で接続する。 In a machining center or the like, a probe for measuring the dimensions of a work is mounted on a movable spindle as a sensor 2. The measurement data is wirelessly transmitted to the machine station, which is a fixed part of the machining center, by a spectral diffusion wireless link that sends a separate package of serial binary data. In this case, the machine station is connected to the adapter 1 and connected to the PC 4 with the USB cable 3.

図2は、他の実施形態による測定システムのブロック図であり、センサ2を複数台としてアダプタ1との間を無線通信で送受信するようにしたものである。アダプタ1は、小容量、例えば64バイト分のメモリを有する程度なので、小型軽量で携帯性に優れているもので良い。したがって、アダプタ1に無線通信の受信機能を内蔵することも可能であり、センサ2からの送信データを受信するようにすることで種々の測定器からの測定データを通信ケーブルが邪魔にならないでPC4に簡単に取り込むことができる。さらに、センサ2を複数台として複数の測定データを同時にPC4に取り込むことも容易となる。
この場合、アダプタ1は、複数台のセンサ等の測定器に無線通信で接続され、それぞれの測定データを指定間隔で時間管理して順次取得して保存するようにしても良い。この際、アダプタ1とセンサ等の測定器とは無線で無く有線で接続されても良い。また、図1、2ではセンサ2とアダプタ1とを別の構成としているが、アダプタ1は小型化が可能であるので、アダプタ1の機能をセンサ2の筐体内に組み込み、センサ2とアダプタ1を一体としても良い。
FIG. 2 is a block diagram of a measurement system according to another embodiment, in which a plurality of sensors 2 are used to transmit and receive wireless communication to and from the adapter 1. Since the adapter 1 has a small capacity, for example, a memory equivalent to 64 bytes, it may be small, lightweight, and excellent in portability. Therefore, it is also possible to incorporate a wireless communication reception function in the adapter 1, and by receiving the transmission data from the sensor 2, the communication cable does not interfere with the measurement data from various measuring instruments. Can be easily imported into. Further, it becomes easy to simultaneously capture a plurality of measurement data into the PC 4 by using a plurality of sensors 2.
In this case, the adapter 1 may be connected to a plurality of measuring instruments such as sensors by wireless communication, and each measurement data may be time-managed at specified intervals to be sequentially acquired and stored. At this time, the adapter 1 and the measuring instrument such as a sensor may be connected by wire instead of wirelessly. Further, in FIGS. 1 and 2, the sensor 2 and the adapter 1 have different configurations, but since the adapter 1 can be miniaturized, the function of the adapter 1 is incorporated in the housing of the sensor 2, and the sensor 2 and the adapter 1 are incorporated. May be integrated.

WINDOWSプログラムでは、例えば、人間がキーボード等でボタンを押してから、それがアプリケーションに反映されてタイマーがスタート、ストップするまでの時間の精度の保証ができない。この動作タイミングについては、OSは一切の保証をしていなく、0.5秒後にプログラムにイベントが届いても異常ではない。仮に、ひたすらポーリングを行い、キーボードのボタン状態を把握すれば、平均1msec程度以下でループが回り平均速度は高速となるが、ループの周回速度が保証されないため、時々極端に遅くなったりする。 In the WINDOWS program, for example, it is not possible to guarantee the accuracy of the time from when a human presses a button on a keyboard or the like until the button is reflected in the application and the timer starts and stops. The OS does not guarantee this operation timing at all, and it is not abnormal even if an event arrives at the program 0.5 seconds later. If polling is performed earnestly and the button state of the keyboard is grasped, the loop will rotate in about 1 msec or less on average and the average speed will be high, but since the loop speed is not guaranteed, it will sometimes become extremely slow.

また、これは、ほぼ無限ループの状態となり、一緒に走っている他のプログラムやサービスがまともに動かなくなる。つまり、マルチタスクOSの仕組み上、動いているプロセスやスレッドが一定周期で切り替わり、その周期は、10〜15ms程度としても、次に自分のプロセス、例えば測定状態で送信要求に戻ってくる時間は保証されない。 It also puts you in an almost infinite loop, causing other programs and services running with you to stop working properly. In other words, due to the mechanism of the multitasking OS, running processes and threads are switched at regular intervals, and even if the cycle is about 10 to 15 ms, the time to return to the transmission request in the next own process, for example, the measurement state, is Not guaranteed.

したがって、通常は、PC4側からアダプタ1側へデータ送信要求(および測定器側からのデータ送信)を立て続けに行ったとしても、コンスタントに10ms以下の間隔にすることはできない。プログラムでの処理や、並列して動作している他のプログラムの状態によっては、さらに不安定となる。 Therefore, normally, even if data transmission requests (and data transmission from the measuring instrument side) are continuously made from the PC4 side to the adapter 1 side, the interval cannot be constantly set to 10 ms or less. It becomes even more unstable depending on the processing in the program and the state of other programs running in parallel.

USB通信はホストとなるPC4が中心の1ビットずつ順番にデータを転送するシリアルバスであり、複数の周辺機器が接続可能となっている。したがって、ホストが全ての処理単位(Transaction)を開始する。この処理単位での最初のパケットは指示票(Token:トークン)と呼ばれ、装置アドレス及びエンドポイントが指示される。そして、その処理が読み込みか書き込みかのうちのどちらか、何が続くのかが記述されており、ホストとなるPC4により生成される。次のパケットは実データ部を運ぶデータ(Data)パケットで、データ送信領域となる。続いて、指示やデータが正しく受信されたか、などを報告するハンドシェークパケットとなっている。 USB communication is a serial bus in which the host PC4 transfers data bit by bit in order, and a plurality of peripheral devices can be connected. Therefore, the host initiates all transitions. The first packet in this processing unit is called a token (token), and the device address and endpoint are indicated. Then, it is described whether the process is read or write, and what continues, and it is generated by the host PC4. The next packet is a data (Data) packet that carries the actual data unit and serves as a data transmission area. Next, it is a handshake packet that reports whether instructions and data have been received correctly.

USB通信において、計測やマンマシン機器のデータ転送ではインタラプト転送が行われ、USB装置側となるアダプタ1が割り込みを生成するが、その前にホスト側であるPC4による巡回問い合わせ(ポーリング)まで待たなければならない。インタラプト転送でのパケット内データ部の最大容量は、フルスピード(USB1.1)で64バイトである。つまり、USB通信においては、1回の送信を行う際には、(必要か否かに関わらず)、必ず64バイトのデータ送信領域が準備されている。 In USB communication, interrupt transfer is performed in measurement and data transfer of man-machine equipment, and the adapter 1 on the USB device side generates an interrupt, but before that, you have to wait until the patrol inquiry (polling) by PC4 on the host side. Must be. The maximum capacity of the in-packet data unit in interrupt transfer is 64 bytes at full speed (USB1.1). That is, in USB communication, a 64-byte data transmission area is always prepared when one transmission is performed (whether or not it is necessary).

次に、測定側の構成を説明する。測定器であるセンサ2の測定データは、USB通信における64バイトのデータ送信領域を利用してアダプタ1を介してPC4へ送信され、そのデータ長さを2バイトで構成する。これにより、アダプタ1に搭載するデータ用メモリは、64バイト分程度の小容量とする。さらに、アダプタ1は、リアルタイムクロック(RTC)を搭載して指定間隔(PC4の送信要求間隔限界以下)で、時間管理された、つまり精密な等時間間隔でサンプリングして測定データの取得が可能なものとする。 Next, the configuration on the measurement side will be described. The measurement data of the sensor 2 which is a measuring instrument is transmitted to the PC 4 via the adapter 1 by utilizing the data transmission area of 64 bytes in the USB communication, and the data length is composed of 2 bytes. As a result, the data memory mounted on the adapter 1 has a small capacity of about 64 bytes. Further, the adapter 1 is equipped with a real-time clock (RTC) and can acquire measurement data by sampling at specified intervals (below the transmission request interval limit of PC4) and time-controlled, that is, sampling at precise equal time intervals. It shall be.

図3は、アダプタ1に搭載するデータ用メモリのデータ領域を示す説明図である。データ用メモリは、2バイトの測定データ長さ(1回分の測定データ長さを2バイトにした場合)に合わせて31回分の測定データ11を保存できるデータ領域と、2バイトの回数データ10[取得したデータ回数(言い換えれば取得したデータ個数)を示すデータ]を保存する回数領域を持っている。この程度のメモリは低機能なマイコンでも十分可能であり、小型のアダプタ1に内蔵することができる。 FIG. 3 is an explanatory diagram showing a data area of the data memory mounted on the adapter 1. The data memory has a data area that can store 31 measurement data 11 according to the 2-byte measurement data length (when the length of one measurement data is set to 2 bytes), and the 2-byte number data 10 [ It has a number-of-times area for storing [data indicating the number of acquired data (in other words, the number of acquired data)]. A memory of this level is sufficiently possible even with a low-performance microcomputer, and can be incorporated in a small adapter 1.

図4は、測定側のフローチャートを示す。アダプタ1は、搭載されたリアルタイムクロック(RTC)によってセンサ2により測定値を等間隔にサンプリングされた測定データとして、データ用メモリのデータ領域に測定データをサンプリングに応じて順次保存する。また、保存した回数をカウントして回数領域に保存する。31回分の測定が行われ、その測定データがデータ用メモリに保存された場合、一番古い測定データを消して、そのデータ領域に最新の測定データを格納する。この履歴はアダプタ1のマイコンで保存して認識しておく。なお、実際の測定では、前回の測定から指定時間が経過してから測定を実行する。また、測定の実行と共に、回数データを1増やして行く。 FIG. 4 shows a flowchart on the measurement side. The adapter 1 sequentially stores the measured values in the data area of the data memory according to the sampling as the measured values sampled by the sensor 2 at equal intervals by the mounted real-time clock (RTC). Also, the number of times saved is counted and saved in the number of times area. When 31 measurements are performed and the measurement data is saved in the data memory, the oldest measurement data is erased and the latest measurement data is stored in the data area. This history is saved and recognized by the microcomputer of the adapter 1. In the actual measurement, the measurement is executed after the designated time has elapsed from the previous measurement. In addition, the number of times data is incremented by 1 as the measurement is executed.

また、アダプタ1のデータ用メモリは、少なくともUSB通信におけるデータ送信領域の容量を持っていれば良く、それ以上の容量を持って、測定データ11をより多く保存できるようにしても良い。この場合は、保存できる回数以上の測定データ11がデータ用メモリに保存されようとする場合、一番古い測定データを消して、そのデータ領域に最新の測定データを格納すれば良い。 Further, the data memory of the adapter 1 may have at least the capacity of the data transmission area in USB communication, and may have a larger capacity so that more measurement data 11 can be stored. In this case, when the measurement data 11 is to be saved in the data memory more than the number of times that can be saved, the oldest measurement data may be erased and the latest measurement data may be stored in the data area.

アダプタ1のデータ用メモリをUSB通信におけるデータ送信領域の容量とした場合、PC4からアダプタ1へデータ送信要求が来たら、データ用メモリに格納されている全ての測定データ11と回数データ10とをUSB通信における64バイトのデータ送信領域にセットして、PC4へ送信する。その後、データ用メモリの測定データ11及び回数データ10を全てクリアする。 When the data memory of the adapter 1 is the capacity of the data transmission area in USB communication, when a data transmission request comes from the PC 4 to the adapter 1, all the measurement data 11 and the number of times data 10 stored in the data memory are stored. It is set in the 64-byte data transmission area in USB communication and transmitted to the PC4. After that, all the measurement data 11 and the number of times data 10 in the data memory are cleared.

アダプタ1のデータ用メモリをUSB通信におけるデータ送信領域の容量以上とした場合、PC4からアダプタ1へ送信要求が来たら、データ用メモリに格納されているうち、送信可能な回数分(データ送信領域のバイト数を64バイトとした場合、31個)の測定データ11と回数データ10とをUSB通信における64バイトのデータ送信領域にセットして、PC4へ送信する。その後、PC4へ送信した測定データ11及び回数データ10を全てクリアする。 When the data memory of the adapter 1 is larger than the capacity of the data transmission area in USB communication, when a transmission request comes from the PC 4 to the adapter 1, the number of times that the data can be transmitted (data transmission area) is stored in the data memory. When the number of bytes in the above is 64 bytes, the measurement data 11 and the number of times data 10 (31) are set in the 64-byte data transmission area in USB communication and transmitted to the PC 4. After that, all the measurement data 11 and the number of times data 10 transmitted to the PC 4 are cleared.

図5は、PC側のフローチャートを示す。WINDOWSプログラムの構成を説明する。PC4では、他のプログラムやサービスに大きな影響がない範囲で可能な限り短い時間間隔で、かつ頻繁にアダプタ1に送信要求を通知する。短い時間間隔とは、測定データ11のサンプリング時間間隔より長く、31回分の測定に比べて短い時間間隔である。測定中は、他のプログラムやサービスに対して優先的に処理を割り当てることが望ましい。測定データとして10msの間隔で取り込むことが必要な場合、10ms×31の間隔で良いが、その1/2から1/4望ましくは1/3の100msの時間間隔であることが良い。 FIG. 5 shows a flowchart on the PC side. The structure of the WINDOWS program will be described. The PC 4 notifies the adapter 1 of the transmission request frequently and at the shortest possible time interval within a range that does not significantly affect other programs and services. The short time interval is longer than the sampling time interval of the measurement data 11 and shorter than the sampling time interval of 31 measurements. During the measurement, it is desirable to preferentially assign processing to other programs and services. When it is necessary to capture the measurement data at intervals of 10 ms, an interval of 10 ms × 31 may be used, but a time interval of 100 ms, which is 1/2 to 1/4 of that, preferably 1/3, is preferable.

アダプタ1は、USB通信におけるデータ送信領域の容量を有したデータ用メモリに複数回分の測定データ11を保存できるデータ領域と、回数データを保存する回数領域と、を有しているので、PC4からアダプタ1への送信要求の間隔は、アダプタ1に保存できる測定データの個数×サンプリング時間間隔の時間以内であることが望ましい。つまり、この範囲ならばWINDOWSプログラムでの処理や、並列して動作している他のプログラムの状態によって送信要求が一定とならなくても時間管理された、つまり精密な等時間間隔でサンプリングして測定データの取得が可能となる。 Since the adapter 1 has a data area capable of storing the measurement data 11 for a plurality of times in a data memory having a capacity of a data transmission area in USB communication and a number area for storing the number of times data, the adapter 1 has a number of times data from the PC4. It is desirable that the interval of the transmission request to the adapter 1 is within the time of the number of measurement data that can be stored in the adapter 1 × the sampling time interval. In other words, within this range, time management is performed even if the transmission request is not constant due to processing by the WINDOWS program or the state of other programs operating in parallel, that is, sampling is performed at precise equal time intervals. Measurement data can be acquired.

アダプタ1から送信された回数データ10が31以下であれば、PC4は、アダプタ1から送信された測定データが等間隔の指定間隔で時間管理された測定データであると認識することができる。回数データ10が31を超える場合は、(回数−31)×指定間隔の時間分だけ時間管理ができなかったとしてWINDOWSプログラムで識別することができる。 If the number of times data 10 transmitted from the adapter 1 is 31 or less, the PC 4 can recognize that the measurement data transmitted from the adapter 1 is time-managed measurement data at regular intervals. When the number of times data 10 exceeds 31, it can be identified by the WINDOWS program as the time management could not be performed for the time of (number of times −31) × the specified interval.

以上の説明では、USB通信におけるデータ送信領域を64バイト、1回分の測定データ11を2バイト、回数データ10を31が限界として説明したが、これらの値はデータ送信領域と測定データ11及び回数データ10のバイト数に合わせて決定すれば良い。 In the above description, the data transmission area in USB communication is 64 bytes, the measurement data 11 for one time is 2 bytes, and the number data 10 is 31 as the limit, but these values are the data transmission area, the measurement data 11, and the number of times. It may be determined according to the number of bytes of data 10.

ここで測定データ11のバイト数とは、1回分の測定データ11のために確保されるバイト数(データ容量)のことであり、どのようなデータの値であっても必ずこのバイト数で表されることになる。また、回数データ10のバイト数も同様に、データの値に関わらず確保されるバイト数(データ容量)であり、データの値は必ずそのバイト数のデータ容量で表されることになる。 Here, the number of bytes of the measurement data 11 is the number of bytes (data capacity) reserved for one measurement data 11, and any data value is always represented by this number of bytes. Will be done. Similarly, the number of bytes of the number-of-times data 10 is also the number of bytes (data capacity) secured regardless of the value of the data, and the value of the data is always represented by the data capacity of the number of bytes.

例えば、測定データ11及び回数データ10のバイト数が2バイト以外である場合、それぞれのバイト数をMバイト、Cバイトと表すと、1回の送信に[(データ送信領域のバイト数−C)/M]個分のデータを送ること(データ送信領域が64バイトの場合は[(64−C)/M]個分)ができる。 For example, when the number of bytes of the measurement data 11 and the number of times data 10 is other than 2 bytes, if the number of bytes is expressed as M bytes and C bytes, respectively, one transmission [(number of bytes in the data transmission area-C). It is possible to send [(64-C) / M] data when the data transmission area is 64 bytes.

したがって、アダプタ1から送信された測定データ数が[(64−C)/M]個以下であれば、等間隔に時間管理された測定データであると判断して認識することができる。そうでなければ、[(回数−(64−C)/M)×指定間隔]の時間(データ送信領域が64バイトの場合は[(回数−31)×指定間隔]の時間だけ時間管理ができなかったとしてWINDOWSプログラムで識別することができる。 Therefore, if the number of measurement data transmitted from the adapter 1 is [(64-C) / M] or less, it can be determined and recognized as time-controlled measurement data at equal intervals. Otherwise, time management can be performed for the time of [(number of times- (64-C) / M) x specified interval] (when the data transmission area is 64 bytes, the time of [(number of times-31) x specified interval]. It can be identified by the WINDOWS program as not.

さらに、データ送信領域が64バイト以上、例えばSバイトであれば、1回の送信に、データ送信領域バイト数から回数データ10のバイト数を減算した値を測定データ11のバイト数で除算した数、[(S−C)/M]個分のデータを送ること(データ送信領域がSバイトの場合)ができる。したがって、アダプタ1から送信された測定データ数が[(S−C)/M]個以下であれば、等間隔に時間管理された測定データであると認識することができる。そうでなければ、時間管理ができなかったとしてWINDOWSプログラムで識別することができる。 Further, if the data transmission area is 64 bytes or more, for example, S bytes, the number obtained by subtracting the number of bytes of the number of times data 10 from the number of bytes of the data transmission area is divided by the number of bytes of the measurement data 11 for one transmission. , [(SC) / M] data can be sent (when the data transmission area is S bytes). Therefore, if the number of measurement data transmitted from the adapter 1 is [(SC) / M] or less, it can be recognized that the measurement data is time-controlled at equal intervals. Otherwise, the WINDOWS program can identify that time management was not possible.

なお、以上の説明では、センサ2として、マシニングセンタなどで使用されるワークの寸法を測定するプローブを例示して説明したが、センサ2は、測長器(電気マイクロメーターおよび光学スケール)、位置検知プローブ、温度センサ、振動センサ、気圧センサ、圧力センサ、湿度センサ、などでも一実施の形態と同様に適用できる。 In the above description, as the sensor 2, a probe for measuring the dimensions of a workpiece used in a machining center or the like has been illustrated as an example, but the sensor 2 is a length measuring device (electric micrometer and optical scale) and position detection. A probe, a temperature sensor, a vibration sensor, a barometric pressure sensor, a pressure sensor, a humidity sensor, and the like can also be applied in the same manner as in one embodiment.

1 アダプタ
2 センサ(測定器)
3 USBケーブル
4 PC
5 コネクタ
10 回数データ
11 測定データ
1 Adapter 2 Sensor (Measuring instrument)
3 USB cable 4 PC
5 Connector 10 times data 11 Measurement data

Claims (8)

測定器からの測定データをUSB通信によりパーソナルコンピュータへ送信するための測定システムにおいて、
前記測定器と接続され、前記測定データを指定間隔で時間管理して順次取得して、その取得回数とともに保存するアダプタと、
該アダプタと前記パーソナルコンピュータとをUSB通信が可能なように接続するための手段と、を備え、
前記アダプタは、
前記USB通信におけるデータ送信領域の容量を有したデータ用メモリに複数回分の前記測定データを保存できるデータ領域と、前記取得回数を示す回数データを保存する回数領域と、を有し、
前記パーソナルコンピュータからデータ送信要求が来た場合、前記測定データと、前記回数データと、を前記データ送信領域にセットして、前記パーソナルコンピュータへ送信することを特徴とする測定システム。
In a measurement system for transmitting measurement data from a measuring instrument to a personal computer via USB communication,
An adapter that is connected to the measuring instrument, manages the measurement data at specified intervals, sequentially acquires it, and saves it together with the number of acquisitions.
A means for connecting the adapter and the personal computer so as to enable USB communication is provided.
The adapter
It has a data area capable of storing a plurality of times of the measurement data in a data memory having a capacity of a data transmission area in the USB communication, and a number area for storing the number of times data indicating the number of acquisitions.
A measurement system characterized in that when a data transmission request comes from the personal computer, the measurement data and the number of times data are set in the data transmission area and transmitted to the personal computer.
前記パーソナルコンピュータを更に備え、
前記測定データのバイト数をMバイト、前記回数データのバイト数をCバイトとして、前記パーソナルコンピュータは、前記アダプタから送信された前記回数データが[(前記データ送信領域のバイト数−C)/M]以下の場合、等間隔に時間管理された測定データであると判断することを特徴とする請求項1に記載の測定システム。
Further equipped with the personal computer
Assuming that the number of bytes of the measurement data is M bytes and the number of bytes of the number of times data is C bytes, the personal computer uses [(number of bytes of the data transmission area −C) / M for the number of times data transmitted from the adapter. ] The measurement system according to claim 1, wherein in the following cases, it is determined that the measurement data is time-controlled at equal intervals.
前記測定データのバイト数をMバイト、前記回数データのバイト数をCバイトとして、
前記アダプタは、前記回数データが[(前記データ送信領域のバイト数−C)/M]に達した場合、前記データ領域に保存された一番古い前記測定データを消して、該データ領域に最新の測定データを格納することを特徴とする請求項1又は2に記載の測定システム。
Let the number of bytes of the measurement data be M bytes and the number of bytes of the number of times data be C bytes.
When the number of times data reaches [(number of bytes of the data transmission area-C) / M], the adapter erases the oldest measurement data stored in the data area and updates the data area. The measurement system according to claim 1 or 2, wherein the measurement data of the above is stored.
前記測定データのバイト数を2バイト、前記回数データのバイト数を2バイト、前記データ送信領域のバイト数を64バイトとして、前記アダプタは、64バイトのデータ用メモリに31回分の前記測定データを保存できる前記データ領域と、前記回数データを保存する回数領域と、を有することを特徴とする請求項1から3のいずれか1項に記載の測定システム。 Assuming that the number of bytes of the measurement data is 2 bytes, the number of bytes of the number of times data is 2 bytes, and the number of bytes of the data transmission area is 64 bytes, the adapter stores the measurement data for 31 times in a 64 byte data memory. The measurement system according to any one of claims 1 to 3, further comprising the data area that can be stored and the number of times area that stores the number of times data. 前記パーソナルコンピュータを更に備え、
前記測定データのバイト数を2バイト、前記回数データのバイト数を2バイト、前記データ送信領域のバイト数を64バイトとして、前記パーソナルコンピュータは、前記アダプタから送信された前記回数データが31以下の場合、等間隔に時間管理された測定データであると判断することを特徴とする請求項1から4のいずれか1項に記載の測定システム。
Further equipped with the personal computer
Assuming that the number of bytes of the measurement data is 2 bytes, the number of bytes of the number of times data is 2 bytes, and the number of bytes of the data transmission area is 64 bytes, the personal computer has 31 or less number of times data transmitted from the adapter. The measurement system according to any one of claims 1 to 4, wherein the measurement data is determined to be time-controlled measurement data at equal intervals.
前記測定データのバイト数を2バイト、前記回数データのバイト数を2バイト、前記データ送信領域のバイト数を64バイトとして、前記アダプタは、前記回数データが31に達した場合、前記データ領域に保存された一番古い前記測定データを消して、該データ領域に最新の測定データを格納することを特徴とする請求項1から5のいずれか1項に記載の測定システム。 Assuming that the number of bytes of the measurement data is 2 bytes, the number of bytes of the number of times data is 2 bytes, and the number of bytes of the data transmission area is 64 bytes, the adapter enters the data area when the number of times data reaches 31. The measurement system according to any one of claims 1 to 5, wherein the oldest stored measurement data is erased and the latest measurement data is stored in the data area. 前記アダプタは、前記測定データと、前記回数データと、を前記データ送信領域にセットして、前記パーソナルコンピュータへ送信した後、送信した前記測定データ及び前記回数データをクリアすることを特徴とする請求項1から6のいずれか1項に記載の測定システム。 The adapter is characterized in that the measurement data and the number of times data are set in the data transmission area, transmitted to the personal computer, and then the transmitted measurement data and the number of times data are cleared. Item 6. The measuring system according to any one of Items 1 to 6. 前記アダプタは、複数台の前記測定器と接続され、それぞれの前記測定データを指定間隔で時間管理して順次取得して保存することを特徴とする請求項1に記載の測定システム。 The measurement system according to claim 1, wherein the adapter is connected to a plurality of the measuring instruments, and each of the measurement data is time-managed at a designated interval to be sequentially acquired and stored.
JP2016239032A 2016-12-09 2016-12-09 Measurement system Active JP6800727B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016239032A JP6800727B2 (en) 2016-12-09 2016-12-09 Measurement system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016239032A JP6800727B2 (en) 2016-12-09 2016-12-09 Measurement system

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2020193091A Division JP7000538B2 (en) 2020-11-20 2020-11-20 Measurement system and data transmission method

Publications (2)

Publication Number Publication Date
JP2018097445A JP2018097445A (en) 2018-06-21
JP6800727B2 true JP6800727B2 (en) 2020-12-16

Family

ID=62632951

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016239032A Active JP6800727B2 (en) 2016-12-09 2016-12-09 Measurement system

Country Status (1)

Country Link
JP (1) JP6800727B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7374483B2 (en) * 2020-03-19 2023-11-07 株式会社Kmc Wireless sensor system and sensor tag

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3922662B2 (en) * 1997-09-05 2007-05-30 株式会社ティアンドデイ Measurement management device and measurement system
JP2001012972A (en) * 1999-06-29 2001-01-19 Fuji Electric Co Ltd Meter checking device and method for storing history data
JP4650620B2 (en) * 2004-03-12 2011-03-16 オムロン株式会社 Measuring device
US20160305797A1 (en) * 2015-02-13 2016-10-20 Ideation Systems Llc Modular System Including Multiple Detachable Sensors

Also Published As

Publication number Publication date
JP2018097445A (en) 2018-06-21

Similar Documents

Publication Publication Date Title
US3818458A (en) Method and apparatus for monitoring a general purpose digital computer
US8942940B2 (en) Portable articulated arm coordinate measuring machine and integrated electronic data processing system
CN102374853B (en) For the device of measurement size
JP4847877B2 (en) System and method for associating DLPDUs received by an interface chip with data measurements made by an external circuit
JP6800727B2 (en) Measurement system
WO2017092459A1 (en) System on chip soc monitoring method, device and computer storage medium
JP7000538B2 (en) Measurement system and data transmission method
JP7295212B2 (en) program
KR20110040827A (en) Conveying information with a pci express tag field
WO2016024483A1 (en) Analog/digital conversion circuit
US11464111B2 (en) Stacked structure of circuit boards
JP2007114862A (en) Network servo system, servo drive, and communication data-tracing method
CN103492130A (en) System for processing measurement data and/or measurement parameter data
US7172129B2 (en) Integrated circuit card capable of automatically transmitting NULL byte information without intervention by CPU
CN105279921A (en) Method for remote control of material testing machine
KR101244636B1 (en) Encoder
CN112154419A (en) Performance monitoring device and method, system on chip, movable platform and camera
RU163179U1 (en) EQUIPMENT CONTROL DEVICE
JP4415711B2 (en) Measurement controller
CN116881065B (en) Bus transmission delay detection module, circuit and method
CN114424017B (en) Measuring system
JPH06230806A (en) Remote i/o system for programmable controller
WO2020240960A1 (en) Data transfer device, control device, setting device, and control method for data transfer device
JP5977614B2 (en) measuring device
CN110505132B (en) Software implementation method for lung function data transmission

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191111

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201125

R150 Certificate of patent or registration of utility model

Ref document number: 6800727

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250