JP3648876B2 - Electronic measuring instrument - Google Patents
Electronic measuring instrument Download PDFInfo
- Publication number
- JP3648876B2 JP3648876B2 JP26005296A JP26005296A JP3648876B2 JP 3648876 B2 JP3648876 B2 JP 3648876B2 JP 26005296 A JP26005296 A JP 26005296A JP 26005296 A JP26005296 A JP 26005296A JP 3648876 B2 JP3648876 B2 JP 3648876B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- signal
- input
- data
- output
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Arrangements For Transmission Of Measured Signals (AREA)
- Selective Calling Equipment (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、例えば電子天びん等の電子計測機器に関し、更に詳しくは、パーソナルコンピュータ等のインテリジェントな外部機器に接続して信号の授受が可能な電子計測機器に関する。
【0002】
【従来の技術】
例えば電子天びん等の電子計測機器においては、外部機器に対する通信ポートを備え、その通信ポートを介してパーソナルコンピュータ等のホストコンピュータと接続し、例えばそのホストからデータ送信指令を受信したときに、計測データ等をホストに対して送信する、といった使われ方をする場合がある。
【0003】
【発明が解決しようとする課題】
ところで、パーソナルコンピュータには、上記のような電子計測機器との通信に供される通信ポートは通常は1つしかなく、従って、1台のパーソナルコンピュータに複数台の電子計測機器を接続する場合には、従来、図8にブロック図を示すように、パーソナルコンピュータ80の通信ポートの数を接続すべき電子計測機器の台数分に拡張すべく、例えばマルチプレクサ81をパーソナルコンピュータ80の通信ポートに接続して、接続すべき台数によっては更にそのマルチプレクサ81に対して幾つかのマルチプレクサ81を接続して、その各マルチプレクサ81に対して各電子計測機器82をパラレルに接続する必要があった。
【0004】
本発明の目的は、マルチプレクサ等の機器を使用することなく、安価な構成のもとに、1つの通信ポートしか持たない通常のパーソナルコンピュータ等に対して実質的に複数台の電子計測機器を接続して、その各電子計測機器とホストとしてのパーソナルコンピュータ間の通信を可能とすることのできる構成を持つ電子計測機器を提供することにある。
【0005】
【課題を解決するための手段】
本発明の電子計測機器は以下の構成を採用することによって、上記の目的を達成している。
【0006】
すなわち、本発明の電子計測機器は、外部との通信ポートを少なくとも2つ有し、信号の出力に際してはその各通信ポートから同内容の信号を出力するように構成する。また、自己のアドレスを記憶するアドレス記憶手段と、入力された信号に含まれるアドレスと自己のアドレスとを比較するアドレス比較手段と、過去所定回以内に外部に出力した各信号と今回入力された信号とを比較する信号比較手段と、これらの各比較手段による比較結果に従ってデータ処理を行う制御手段を設け、その制御手段は以下のA〜Dに示す規定に従って動作するように構成している。
【0007】
A.アドレス比較手段により、入力された信号に含まれるアドレスが自己アドレスであると判定されたときには、当該信号に含まれる内容に従ったデータ処理を行い、その処理後のデータの送信が要求されている場合には、そのデータを自己のアドレスとともに上記各通信ポートから出力する。
【0008】
B.アドレス比較手段により、入力された信号に含まれるアドレスが自己アドレスよりも上位のアドレスであると判定されたとき、入力された当該信号を無視する。
【0009】
C.アドレス比較手段により、入力された信号に含まれるアドレスが自己アドレスよりも下位のアドレスであると判定されたとき、入力された当該信号をそのまま上記各通信ポートから出力する。
【0010】
D.信号比較手段により、今回入力された信号と過去所定回以内の外部への各出力信号とが一致していると判定された場合、今回入力された当該信号を無視する。
【0011】
ここで、本発明において、「通信ポートを少なくとも2つ有し」とは、互いに独立した2つの通信ポートを有する場合のほか、内部回路は1つで、かつ、その1つのポートが2つ以上の通信用のコネクタに対して並列に配線されたものをも含む。
【0012】
また、本発明において、アドレスの上位、下位とは、パーソナルコンピュータ等のインテリジェントな外部機器に対する後述するようなシリーズの接続状態において、そのパーソナルコンピュータ等に対してより近い側に付されるアドレスを上位、遠い側のアドレスを下位と定義するものである。
【0013】
更に、本発明において「入力された信号を無視する」とは、その信号の入力によって何もしない、つまり、信号の処理や記憶、あるいは当該信号の転送等を一切せず、入力信号を捨てることを意味する。
【0014】
以上の構成からなる本発明の電子計測機器は、1台のパーソナルコンピュータ等に対して複数台を接続する場合、図2に例示するように、各電子計測機器はシリーズに接続される。すなわち、パーソナルコンピュータの通信ポートに直接接続するのは1台の最上位の電子計測機器♯4だけである。また、各電子計測機器には、あらかじめ個々にアドレス(例えば♯4〜♯1)が設定され、パーソナルコンピュータから各電子計測機器に対して個別に指令等を与える場合には、その通信ポートからその指令等を該当するアドレスとともに出力する。
【0015】
このような接続状態において、パーソナルコンピュータから所定のアドレスの電子計測機器♯2に対して、そのアドレスとともに指令等を供給したとき、そのアドレスよりも上位のアドレスを持つ電子計測機器♯4、♯3はその入力内容をそのまま各通信ポートから出力するため(規定C)、その指令等は上位アドレスの電子計測機器♯4,♯3を通じて該当のアドレスの電子計測機器♯2に入力されて、その指令等に従ったデータ処理が行われる(規定A)。
【0016】
ここで、指令等の供給対象となっている電子計測機器♯2よりも上位のアドレスの電子計測機器、例えば♯3の機器では、規定Cに従い、♯4の機器を介して♯2の機器に対する信号を受信したとき、その信号を下位側の♯2の機器のほかに上位側の♯4の機器にも送信する。従って♯4の機器では、パーソナルコンピュータから既に入力し、かつ、出力したものと同じ信号が再び入力されることになるが、この場合、規定Dにより、その入力信号は無視されるから、同じ信号がシステム内を何回も行き交う不具合は生じない。
【0017】
また、上記した♯2の機器に対して供給された指令等が、当該♯2の機器の計測データの送信指令であったとき、その指令通りにデータを送信するが、そのデータは当該♯2の機器のアドレスとともに各通信ポートから出力され(規定A)、上位側および下位側の♯3および♯1の機器に対して等しく出力される。このとき、上位側の機器♯3は、動作規定Cに従ってその信号を♯4および♯2の機器に出力する。♯4では、同じく規定Cに従ってその入力内容を機器♯3およびパーソナルコンピュータにそのまま出力するため、パーソナルコンピュータに機器♯2からのデータが伝送される。このとき、♯4の機器から♯3の機器に出力された♯2の機器の計測データは、規定Dに従って無視され、また、♯2の機器から下位側の♯1の機器に対して供給された計測データは、規定Bに従って無視されるため、計測機器側からパーソナルコンピュータに向けて出力された計測データ等の繰り返し伝送の問題も生じない。
【0018】
さて、本発明においては、複数台の電子計測機器のそれぞれに前もってアドレスを付与する必要があるが、このアドレス付与は、請求項2に記載の構成、すなわち、特定のコマンドとともにアドレスデータが入力されたとき、その特定コマンドを含む信号の入力が1回目であるときには、そのアドレスデータを自己のアドレスとしてアドレス記憶手段に格納し、かつ、そのアドレスデータをアドレスの1カウント相当量だけ下位側に変更して、その変更結果があらかじめ設定されている最下位アドレスを含めてそれよりも上位側に相当するアドレスである場合に限って当該変更後のアドレスデータを上記特定のコマンドとともに各通信ポートから出力するとともに、特定コマンドを含む信号の2回目以降の入力に際しては、その入力信号を無視するように構成されたアドレス設定手段を設けることにより、極めて容易かつ確実に行うことができる。
【0019】
以上のアドレス設定手段を設ける場合、パーソナルコンピュータに対して例えばn台の電子計測機器を接続する場合、パーソナルコンピュータから特定のコマンド、例えば¥と、アドレスデータとして例えば数値データnを出力する。これにより、例えばアドレスの上位側、つまりパーソナルコンピュータに近い側ほどそのアドレスデータである数値を大きくし、かつ、下位側は上位側よりも1カウントだけ小さい数値のアドレスを付するように設定したときには、最上位の機器には自己のアドレスとしてnが格納され、コマンド¥とn−1が各通信ポートから出力される。これを受けた下位側の電子計測機器では、自己のアドレスとしてn−1を格納すると同時に、コマンド¥とn−2を各通信ポートから出力して、上位側および下位側の機器に供給する。上位側の機器では、コマンド¥の入力が2回目であるからこれを無視し、下位側の機器ではn−2を自己のアドレスとして格納すると同時に、コマンド¥とn−3を各通信ポートから出力する。このようにして、パーソナルコンピュータから特定のコマンドとともに電子計測機器の接続台数に相当するカウント数のアドレスデータを1回出力するだけで、シリーズに接続されている全ての電子計測機器に上位側から下位側へと1カウントずつ小さいアドレスが自動的に設定され、各電子計測機器にアドレス設定用のハード的構成を設けることなく、容易かつ確実に各機器に対してアドレス設定を行うことができる。
【0020】
【発明の実施の形態】
図1は本発明を電子天びんに適用した場合の実施の形態の構成を示すブロック図である。
【0021】
荷重検出部1は皿1a上の荷重に対応する電気信号を出力し、その出力信号はA−D変換器2によってデジタル化された後、制御部3に取り込まれる。制御部3はCPU31、ROM32、RAM33および入出力ポート34を備えたマイクロコンピュータを主体として構成されている。入出力ポート34には、前記したA−D変換器2と、計量値を表示するための表示器4、および、風袋処理やスパン較正指令等の電子天びんに必要な各種スイッチ群5のほかに、送信および受信用の2つのレベル変換器6a,6bが接続されている。そして、送信用のレベル変換器6aには2つの送信ポートTX1とTX2が、また、受信用のレベル変換器6bには2つの受信ポートRX1とRX2が接続されており、送信ポートTX1と受信ポートRX1とが1つのコネクタに集約されて第1の通信ポート7が構成され、また、送信ポートTX2と受信ポートRX2とが集約されて第2の通信ポート8が構成される。
【0022】
A−D変換器2を介して制御部3に刻々と取り込まれた荷重データは、ROM32に書き込まれたプログラムに従い、公知の平均化演算や風袋処理、並びに質量値への換算に供され、これらの演算によって計量値が決定されて表示器4に表示される。
【0023】
ROM32には、以上のような計量値決定のためのプログラムのほか、後述する通信用のプログラムと、アドレス設定用のプログラムが書き込まれている。
さて、本発明の実施の形態である電子天びんは、図2にその使用状態における接続例をブロック図で示すように、その複数台をシリーズに1台のパーソナルコンピュータ10に接続した状態で、そのパーソナルコンピュータ10を全ての電子天びんに対するホストコンピュータとして機能させることができる。
【0024】
この接続は、図示のように、各電子天びんのそれぞれが備えている2つの通信ポート7と8に、両隣に位置する電子天びんの通信ポート7または8をそれぞれ接続することよって行われる。なお、パーソナルコンピュータ10に直接接続される最上位の電子天びんは、2つの通信ポート7または8が、パーソナルコンピュータ10が備えている1つの通信ポート11に対して接続される。
【0025】
この図2の例において4台の電子天びんがパーソナルコンピュータに接続されているが、その各電子天びんには、図示の通り、♯4〜♯1のアドレス、つまりパーソナルコンピュータ10に近い上位側ほど番号の大きなアドレスが、あらかじめ設定されてそれぞれのRAM33に記憶されている。そして、パーソナルコンピュータ10では、各電子天びんのうち、任意の電子天びんに対して指令等を供給する場合には、その指令とともに該当の電子天びんのアドレスを出力するように設定されている。なお、各電子天びんに対するアドレス設定は、パーソナルコンピュータ10から特定のコマンドが供給されたときに起動するアドレス設定用のプログラムによりソフト的に行われるのであるが、この設定に関しては後で詳述する。
【0026】
図3は各電子天びんのROM32に書き込まれた通信用のプログラムの内容を示すフローチャートであり、以下、この図を参照しつつ、図2に示した接続状態における通信動作について述べる。
【0027】
この通信用のプログラムは、前記した通常の測定プログラムの実行中において外部からアドレスデータを含む信号が到来したときに、割り込み処理によって実行される。2つの通信ポート7,8のいずれかからアドレスを含む信号が入力されると、まず、その入力信号と過去所定回以内に自己が出力した各信号を比較し(ST1)、その各出力信号のいずれかに今回の入力信号が一致していれば、その信号を無視し、当該入力信号によって起動したプログラムを終了し、次の信号入力を待つ(ST2)。今回の入力信号が過去所定回以内の出力信号のいずれにも一致していない場合には、入力信号に含まれるアドレスと、自己のアドレスとを比較する(ST3)。入力信号に含まれるアドレスが自己のアドレスよりも上位のアドレスであった場合、その入力信号をそのまま2つの通信ポート7,8の双方から出力する(ST4)。また、入力信号に含まれるアドレスが自己のアドレスよりも下位のアドレスであった場合、ST2に進んでその入力信号を無視してプログラムを終了し、次の信号の入力を待つ。一方、入力信号に含まれるアドレスが自己のアドレスと一致している場合、その入力信号の内容に応じた処理を実行する(ST5)。このとき、その入力信号の内容に、例えば計測データ等の送信要求が含まれている場合には、要求されているデータに自己のアドレスを付して2つの通信ポート7,8の双方から出力する(ST6,ST7)。
【0028】
以上の通信用プログラムに従って各電子天びん♯4〜♯1が通信動作を行うことにより、以下に具体的な動作例を示すように、各電子天びん♯4〜♯1は、1台のパーソナルコンピュータ10に対して実質的にパラレルに接続された場合と同様に、個々の電子天びん♯4〜♯1とパーソナルコンピュータ10との間で信号の授受を行うことができる。
【0029】
図4および図5はその具体的な動作説明図である。
図4の例は、パーソナルコンピュータ10が最下位アドレスの電子天びん♯1のデータを採取する場合の例を示している。また、この図4および後述の図5においては、各通信動作に対して、図3のプログラムにおける該当のSTナンバーを付している。
【0030】
この例において、パーソナルコンピュータ10から、データ送信を要求する例えば「out」のコマンドに、該当の機器のアドレス♯1を付して「♯1−out」の信号を出力する。この信号はまず、パーソナルコンピュータ10に直接的に接続されている電子天びん♯4に入力され、この電子天びん♯4では、図3におけるST1,ST3を経てST4が実行され、その入力信号をそのまま電子天びん♯3とパーソナルコンピュータ10に出力する。このとき、パーソナルコンピュータ10のソフトにおいて、図3に示したプログラムにおけるST1,ST2に相当するルーチンを設けておくことにより、電子天びん♯4からの入力信号を無視することができる。
【0031】
電子天びん♯3では、「♯1−out」の信号が入力することにより、上記と同様にST4が実行されて、その入力信号をそのまま電子天びん♯4と♯2に出力する。電子天びん♯4では、その入力信号は図3におけるST1,ST2によって無視する一方、電子天びん♯2では、「♯1−out」の信号入力により、ST4によりその入力信号をそのまま電子天びん♯3と♯1に出力する。電子天びん♯3では、ST1,ST2によってその入力信号を無視する。
【0032】
電子天びん♯1に「♯1−out」の信号が入力すると、ST5〜ST7に従い、データに自己のアドレス♯1を付して「♯1−データ」の信号を出力する。この信号「♯1−データ」は電子天びん♯2に入力されるが、電子天びん♯2では、ST4に従い、その信号をそのまま電子天びん♯3と♯1に出力する。電子天びん♯1ではST1,ST2に従ってその入力信号を無視するが、電子天びん♯3ではST4に従ってその信号「♯1−データ」をそのまま電子天びん♯4と♯2に出力する。このとき、電子天びん♯2ではST1,ST2に従ってその信号を無視し、電子天びん♯4では、ST4に従ってその信号をパーソナルコンピュータ10と電子天びん♯3に出力し、これによって電子天びん♯1からのデータがパーソナルコンピュータ10に到達することになる。なお、この信号は電子天びん♯3においてST1,ST2に従って無視される。
【0033】
図5は電子天びん♯3に対して上記と同様のデータ送信指令を与えた場合の例である。
この場合、パーソナルコンピュータ10から「♯3−out」の信号が出力される。その信号は電子天びん♯4のST4によってパーソナルコンピュータ10と電子天びん♯3に出力され、パーソナルコンピュータ10ではその信号を無視するが、電子天びん♯3では、ST5〜ST7に従い、「♯3−データ」を電子天びん♯4および♯2に出力する。電子天びん♯2では、ST3,ST2に従ってその入力信号を無視するが、電子天びん♯4では、ST4に従ってその入力信号「♯3−データ」をパーソナルコンピュータ10および電子天びん♯3に出力し、これによってそ電子天びん♯3からのデータがパーソナルコンピュータ10に到達する。なお、電子天びん♯3では電子天びん♯4からの信号「♯3−データ」をST1,ST2によって無視する。
【0034】
以上のように、1つの通信ポートを持つ1台のパーソナルコンピュータ10に対して複数台の電子天びんをシリーズに接続した状態で、その個々の電子天びんとパーソナルコンピュータ10との間で、実質的に直接的な信号の授受が可能となる。
【0035】
次に、各電子天びんのROM32に書き込まれたアドレス設定用のプログラムについて述べる。図6はその内容を示すフローチャートである。
このアドレス設定用のプログラムは、図2のように各電子天びんがシリーズにパーソナルコンピュータ10に接続された状態で、パーソナルコンピュータ10から特定のコマンド(例えば¥)が供給されたときに割り込み処理によって起動する。パーソナルコンピュータ10では、アドレス設定に際して上記の特定コマンド¥とともに、天びん接続台数に応じた最上位アドレスに対応するアドレスデータ(図2の例では接続台数が4で、アドレスは数値4〜1で表されており、かつ、パーソナルコンピュータ10に近い上位側ほど数値の大きなアドレスが設定され、従ってその最上位アドレスは4)に相当するアドレスデータを出力する。
【0036】
さて、各電子天びんにおいて、以上のようなコマンド¥とアドレスデータnを含む信号「¥n」が入力されると、そのコマンド¥付きの信号の入力が1回目であるか否かを判定し(ST21)、1回目でなければその入力信号を無視する(ST22)。¥付き信号の入力が1回目であるならば、コマンド¥に続くアドレスデータnを自己のアドレスデータとしてRAM33に格納し(ST23)、同時にそのデータnからアドレスの1カウント相当量を減算し(ST24)、その減算後のアドレスデータn′が、あらかじめ最下位アドレスとして設定されているアドレス以上の場合に限って、その減算後のアドレスデータn′にコマンド¥を付して各通信ポート7,8から出力する(ST25,ST26)。減算後のアドレスデータn′が、あらかじめ最下位アドレスとして設定されているアドレス未満、例えばアドレスを数値で表し、かつ、最下位アドレスを1と設定している場合においてn′=0となった場合には、ST26を実行せずにプログラムを終了する。
【0037】
図7は、図2に示した接続状態において、同図に示すように各電子天びんに対して♯4〜♯1のアドレスを設定する場合の各機器の通信動作の説明図である。この場合、パーソナルコンピュータ10に対する電子天びんの接続台数は4であり、また、アドレスを数値で表しているため、パーソナルコンピュータ10から「¥4」の信号を出力する。また、この場合、最下位アドレスは1とあらかじめ設定される。
【0038】
その信号「¥4」はパーソナルコンピュータ10に直接的に接続された電子天びんに入力され、この電子天びんでは、ST21からST23を実行して自己のアドレスとして♯4を記憶する。そして、この電子天びん♯4は、ST24〜ST26により、アドレスデータを1カウント減算した後に各通信ポートから「¥3」の信号を出力する。この出力はパーソナルコンピュータ10と下流側の電子天びんに入力され、その下流側の電子天びんはこの入力信号により同じくST21,ST23により自己のアドレスとして♯3を記憶すると同時に、ST24〜ST26により上流側の電子天びん♯4および下流側の電子天びんに「¥2」の信号を出力する。
【0039】
電子天びん♯4では、コマンド¥が付された信号の入力が2回目であるから、ST21,ST22によってその入力信号を無視するが、下流側の電子天びんでは「¥2」の信号入力により、ST21,ST23により自己のアドレスとして♯2を記憶するとともに、ST24〜ST26によって「¥1」の信号を電子天びん♯3および下流側の電子天びんに出力する。
【0040】
電子天びん♯3では、上記と同様にST21,ST22によってその入力信号を無視するが、下流側の電子天びんではST21,ST23により自己のアドレスとして♯1を記憶する。また、この電子天びん♯1では、ST24によってそのアドレスデータを1カウント減算するが、その減算結果は0となってあらかじめ設定されている最下位アドレス未満であるため、ST25からST26に進まず、信号を出力しない。
【0041】
以上のように、パーソナルコンピュータ10から特定コマンド¥とともに、接続されている電子天びんの台数に応じた最上位アドレスに対応するアドレスデータを1回だけ出力することにより、全ての電子天びんはその接続順位に応じたアドレスが設定される。
【0042】
以上の本発明の実施の形態において特に注目すべき点は、各電子天びんに対してハード的には2つのレベル変換器と2つの通信ポート用のコネクタを設けるほかは何らの追加をすることなく、また、パーソナルコンピュータ10にはハード的な何らの追加を行うことなく、任意台数の電子天びんをホストコンピュータとしての1台のパーソナルコンピュータに接続することができる点であり、マルクプレクサ等を用いて各電子天びんをパラレルに接続する場合に比して、安価な構成のもとに同等の機能を達成することができる。
【0043】
また、以上の実施の形態のように、各電子天びんの入出力ポート34の1つの入力端並びに1つの出力端に、それぞれ1個ずつレベル変換器6aないしは6bを接続して、その各レベル変換器6a,6bに、2つの通信ポート7,8の送信ポートTX1,TX2、ないしは受信ポートRX1,RX2をそれぞれ接続することにより、各送受信ポートごとに入力端,出力端を割り当てる場合に比してレベル変換器の数を半分にすることができると同時に、割り込みポート数を節約できるという利点がある。このような接続を可能としているのは、本発明においては2つの通信ポートから同じ信号を出力すること、および、2つの通信ポートのいずれから入力された信号であっても、その信号を機器内部では全く同じように取り扱うからである。ただし、本発明は、2つの通信ポート7,8として、互いに独立したものを用いることも可能であることは勿論である。
【0044】
なお、上記の例では、アドレスを数値で表し、かつ、パーソナルコンピュータに近い上位アドレスほど、その数値を大とした例を示したが、上位アドレスほど数値を小としてもよいことは勿論である。そして、この場合、アドレス設定用のプログラムでは、1つの電子計測機器に最初の特定コマンドとともにアドレスデータが供給されたとき、そのアドレスデータを自己のアドレスとして記憶するとともに、供給されたアドレスデータに1カウントだけ加算した上で、特定コマンドとともに外部に出力するように構成すればよい。
【0045】
また、アドレスは上記の例のように数値とする必要は必ずしもなく、要は上位・下位の識別がつき、かつ、1カウント相当量ごとの変更が可能なデータであれば、例えば“A”という文字を並べたものでアドレスを表し、その文字数によって個々のアドレスを示す等、任意の形態のアドレスを採用し得ることは勿論である。
【0046】
更に、本発明は、図6に例示されるアドレス設定用のプログラムについては必ずしも備えている必要はなく、例えば各電子天びんにアドレス設定用のディップスイッチ等を設けることによって人為的にアドレス設定を行ってもよいが、アドレス設定用のプログラムを設けることにより、そのようなハード上の追加が不要となるばかりでなく、人為的なアドレス設定ミスを防止し得る点においても有用である。
【0047】
更にまた、本発明は、電子天びんのみならず、CPU等のインテリジェントな素子を備えた計測機器であれば、任意の電子計測機器に適用し得ることは言うまでもない。
【0048】
【発明の効果】
以上のように、本発明によれば、電子計測機器に少なくとも2つの通信ポートを設け、所要の通信用プログラムを書き込んでおくだけで、パーソナルコンピュータに対してマルチプレクサ等の何らのハード的な追加をすることなく、1台の複数台の電子計測機器をシリーズに接続して、個々の各電子計測機器とパーソナルコンピュータ間で所望の通信を行うことが可能となり、接続状態のシステム全体としてのコストを抑えることができる。
【図面の簡単な説明】
【図1】本発明を電子天びんに適用した場合の実施の形態の構成を示すブロック図
【図2】図1の実施の形態の複数台を1台のパーソナルコンピュータに接続した状態の説明図
【図3】本発明の実施の形態におけるROM32に書き込まれた通信用プログラムの内容を示すフローチャート
【図4】図2の接続状態における各機器間の通信動作の例の説明図
【図5】同じく図2の接続状態における各機器間の通信動作の例の説明図
【図6】本発明の実施の形態におけるROM32に書き込まれたアドレス設定用プログラムの内容を示すフローチャート
【図7】図2の接続状態において、アドレス設定用プログラムを動作させた場合における各機器の動作例の説明図
【図8】従来の電子計測機器の複数台を1台のパーソナルコンピュータに接続する場合のシステム構成例を示すブロック図
【符号の説明】
1 荷重検出部
3 制御部
31 CPU
32 ROM
33 RAM
34 入出力ポート
6a,6b レベル変換器
7 第1の通信ポート
8 第2の通信ポート
TX1,TX2 送信ポート
RX1,RX2 受信ポート
10 パーソナルコンピュータ
11 通信ポート
♯1〜♯4 電子天びん[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an electronic measuring device such as an electronic balance, and more particularly to an electronic measuring device that can be connected to an intelligent external device such as a personal computer to exchange signals.
[0002]
[Prior art]
For example, an electronic measuring instrument such as an electronic balance has a communication port for an external device, and is connected to a host computer such as a personal computer via the communication port. For example, when a data transmission command is received from the host, measurement data is received. May be used, such as sending to the host.
[0003]
[Problems to be solved by the invention]
By the way, a personal computer normally has only one communication port for communication with the electronic measuring device as described above. Therefore, when connecting a plurality of electronic measuring devices to one personal computer. Conventionally, as shown in the block diagram of FIG. 8, for example, a
[0004]
An object of the present invention is to connect a plurality of electronic measuring devices substantially to an ordinary personal computer or the like having only one communication port with an inexpensive configuration without using a device such as a multiplexer. Then, it is providing the electronic measuring device with the structure which can enable communication between each electronic measuring device and the personal computer as a host.
[0005]
[Means for Solving the Problems]
The electronic measuring instrument according to the present invention achieves the above object by adopting the following configuration.
[0006]
That is, the electronic measuring instrument of the present invention has at least two communication ports with the outside, and is configured to output signals having the same contents from the respective communication ports when signals are output. Also, address storage means for storing its own address, address comparison means for comparing the address included in the input signal with its own address, each signal output to the outside within a predetermined number of times in the past and this time input A signal comparison means for comparing the signals and a control means for performing data processing according to the comparison result of each of the comparison means are provided, and the control means is configured to operate in accordance with the following rules A to D.
[0007]
A. When the address comparison means determines that the address included in the input signal is a self address, data processing is performed according to the content included in the signal, and transmission of the data after the processing is requested. In this case, the data is output from each communication port together with its own address.
[0008]
B. When the address comparison means determines that the address included in the input signal is a higher address than the self address, the input signal is ignored.
[0009]
C. When the address comparing means determines that the address included in the input signal is a lower address than the self address, the input signal is output as it is from each communication port.
[0010]
D. When it is determined by the signal comparison means that the signal input this time matches the output signals to the outside within the past predetermined number of times, the signal input this time is ignored.
[0011]
Here, in the present invention, “having at least two communication ports” means that there are two communication ports independent of each other, one internal circuit, and two or more of the one port. Also included are those wired in parallel with the communication connector.
[0012]
Further, in the present invention, the upper address and the lower address are addresses assigned to the side closer to the personal computer or the like in a series connection state as described later with respect to an intelligent external device such as a personal computer. The address on the far side is defined as the lower order.
[0013]
Further, in the present invention, “ignoring the input signal” means that nothing is done by the input of the signal, that is, the input signal is discarded without processing or storing the signal or transferring the signal at all. Means.
[0014]
When a plurality of electronic measuring devices of the present invention configured as described above are connected to one personal computer or the like, each electronic measuring device is connected in series as illustrated in FIG. That is, only one uppermost electronic
[0015]
In such a connection state, when a command or the like is supplied together with the address from the personal computer to the electronic
[0016]
Here, in the electronic measuring device having an address higher than the electronic
[0017]
Further, when the command or the like supplied to the # 2 device is a measurement data transmission command of the # 2 device, the data is transmitted according to the command. Are output from each communication port (regulation A), and are output equally to the upper and
[0018]
In the present invention, it is necessary to assign an address to each of a plurality of electronic measuring instruments in advance. This address assignment is performed according to the configuration described in
[0019]
In the case where the above address setting means is provided, for example, when n electronic measuring devices are connected to a personal computer, a specific command, for example, \ and numerical data n, for example, are output as address data from the personal computer. As a result, for example, when the higher address side, that is, the closer to the personal computer, the numerical value that is the address data is made larger, and the lower side is set to have an address that is smaller by one count than the upper side. The uppermost device stores n as its own address, and commands \ and n-1 are output from each communication port. In response to this, the lower electronic measuring device stores n-1 as its own address, and simultaneously outputs the commands ¥ and n-2 from each communication port and supplies them to the upper and lower devices. The upper device ignores the command \ input for the second time, and the lower device stores n-2 as its own address and simultaneously outputs the commands \ and n-3 from each communication port. To do. In this way, it is only necessary to output address data with a count corresponding to the number of connected electronic measuring devices together with a specific command from a personal computer, and to all electronic measuring devices connected to the series from the upper side. An address smaller by one count is automatically set to the side, and it is possible to easily and surely set an address for each device without providing a hardware configuration for setting an address in each electronic measuring device.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a configuration of an embodiment when the present invention is applied to an electronic balance.
[0021]
The
[0022]
The load data taken into the
[0023]
In addition to the program for determining the measurement value as described above, the
Now, the electronic balance according to the embodiment of the present invention is connected to a single
[0024]
As shown in the figure, this connection is performed by connecting the
[0025]
In the example of FIG. 2, four electronic balances are connected to a personal computer. As shown in the figure, each electronic balance has
[0026]
FIG. 3 is a flowchart showing the contents of the communication program written in the
[0027]
This communication program is executed by interrupt processing when a signal including address data comes from outside during the execution of the above-described normal measurement program. When a signal including an address is input from one of the two
[0028]
When the
[0029]
4 and 5 are diagrams for explaining the specific operation.
The example of FIG. 4 shows an example in which the
[0030]
In this example, the
[0031]
In the
[0032]
When the “# 1-out” signal is input to the
[0033]
FIG. 5 shows an example in which a data transmission command similar to the above is given to the
In this case, the
[0034]
As described above, with a plurality of electronic balances connected in series to one
[0035]
Next, an address setting program written in the
This address setting program is activated by interrupt processing when a specific command (for example, \) is supplied from the
[0036]
Now, in each electronic balance, when the signal “¥ n” including the command ¥ and the address data n as described above is input, it is determined whether or not the input of the signal with the command ¥ is the first time ( (ST21) If it is not the first time, the input signal is ignored (ST22). If the input of the signal with a \ is the first time, the address data n following the command \ is stored in the
[0037]
FIG. 7 is an explanatory diagram of the communication operation of each device when the
[0038]
The signal “¥ 4” is input to an electronic balance directly connected to the
[0039]
In the
[0040]
In the
[0041]
As described above, by outputting the address data corresponding to the most significant address corresponding to the number of connected electronic balances together with the specific command ¥ from the
[0042]
In the above-described embodiment of the present invention, it should be particularly noted that each electronic balance is hardware-added with no additions except that two level converters and two connectors for communication ports are provided. In addition, an arbitrary number of electronic balances can be connected to one personal computer as a host computer without adding any hardware to the
[0043]
Further, as in the above embodiment, one
[0044]
In the above example, the address is represented by a numerical value, and the numerical value is increased as the higher address closer to the personal computer. Of course, the numerical value may be smaller as the higher address. In this case, in the address setting program, when address data is supplied to one electronic measuring instrument together with the first specific command, the address data is stored as its own address, and 1 is added to the supplied address data. After adding only the count, it may be configured to output to the outside together with the specific command.
[0045]
In addition, the address is not necessarily a numerical value as in the above example. In short, if the data can be identified by upper / lower order and can be changed by an amount equivalent to one count, for example, “A” is used. It goes without saying that an arbitrary form of address can be adopted, such as an address being represented by an array of characters, each address being indicated by the number of characters.
[0046]
Furthermore, the present invention does not necessarily have the address setting program illustrated in FIG. 6. For example, each electronic balance is provided with a dip switch for address setting, and the address setting is performed artificially. However, by providing an address setting program, it is not only unnecessary to add such hardware, but it is also useful in that an artificial address setting error can be prevented.
[0047]
Furthermore, it goes without saying that the present invention can be applied not only to an electronic balance but also to any electronic measuring device as long as it is a measuring device including an intelligent element such as a CPU.
[0048]
【The invention's effect】
As described above, according to the present invention, any hardware addition such as a multiplexer or the like can be added to a personal computer simply by providing at least two communication ports in an electronic measuring device and writing a required communication program. It is possible to connect a plurality of electronic measuring devices to the series without having to perform desired communication between each electronic measuring device and a personal computer, thereby reducing the cost of the connected system as a whole. Can be suppressed.
[Brief description of the drawings]
FIG. 1 is a block diagram showing the configuration of an embodiment when the present invention is applied to an electronic balance.
FIG. 2 is an explanatory diagram of a state in which a plurality of the embodiment of FIG. 1 is connected to one personal computer.
FIG. 3 is a flowchart showing the contents of a communication program written in
4 is an explanatory diagram of an example of communication operation between devices in the connection state of FIG. 2;
5 is an explanatory diagram of an example of communication operation between devices in the connection state of FIG.
FIG. 6 is a flowchart showing the contents of an address setting program written in the
7 is an explanatory diagram of an operation example of each device when the address setting program is operated in the connection state of FIG. 2;
FIG. 8 is a block diagram showing a system configuration example in the case where a plurality of conventional electronic measuring devices are connected to one personal computer.
[Explanation of symbols]
1 Load detector
3 Control unit
31 CPU
32 ROM
33 RAM
34 I / O ports
6a, 6b level converter
7 First communication port
8 Second communication port
TX1, TX2 transmission port
RX1, RX2 receiving port
10 Personal computer
11 Communication port
# 1 to # 4 Electronic balance
Claims (2)
その制御手段は、
上記アドレス比較手段により、入力された信号に含まれるアドレスが自己アドレスであると判定されたとき、当該信号に含まれる処理内容に従ったデータ処理を行い、その処理後のデータの送信が要求されている場合には、そのデータを自己のアドレスとともに上記各通信ポートから出力し、
上記アドレス比較手段により、入力された信号に含まれるアドレスが自己アドレスよりも上位のアドレスであると判定されたとき、入力された当該信号を無視し、
上記アドレス比較手段により、入力された信号に含まれるアドレスが自己アドレスよりも下位のアドレスであると判定されたとき、入力された当該信号をそのまま上記各通信ポートから出力するとともに、
上記信号比較手段により、今回入力された信号と過去所定回にわたって外部に出力した信号とが一致していると判定された場合、今回入力された当該信号を無視する、
ように動作することを特徴とする電子計測機器。An electronic measuring device that transmits and receives signals by connecting to intelligent external devices such as personal computers and has at least two communication ports with the outside. Address storage means for storing its own address, address comparison means for comparing the address contained in the input signal with its own address, and externally within a predetermined number of times in the past A signal comparison means for comparing each output signal and the signal input this time, and a control means for performing data processing according to the comparison result by each comparison means,
The control means is
When the address comparison means determines that the address included in the input signal is a self-address, data processing is performed according to the processing content included in the signal, and transmission of data after the processing is requested. If that is the case, output the data along with its own address from each communication port,
When the address comparison means determines that the address included in the input signal is an address higher than the self address, the input signal is ignored,
When the address comparison means determines that the address included in the input signal is a lower address than the self address, the input signal is output as it is from each communication port, and
When it is determined by the signal comparison means that the signal input this time and the signal output to the outside for a predetermined number of times in the past coincide with each other, the signal input this time is ignored.
Electronic measuring instrument characterized by operating as follows.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP26005296A JP3648876B2 (en) | 1996-09-30 | 1996-09-30 | Electronic measuring instrument |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP26005296A JP3648876B2 (en) | 1996-09-30 | 1996-09-30 | Electronic measuring instrument |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH10104052A JPH10104052A (en) | 1998-04-24 |
JP3648876B2 true JP3648876B2 (en) | 2005-05-18 |
Family
ID=17342644
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP26005296A Expired - Fee Related JP3648876B2 (en) | 1996-09-30 | 1996-09-30 | Electronic measuring instrument |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3648876B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005316544A (en) * | 2004-04-27 | 2005-11-10 | Hioki Ee Corp | Communication module, output module, link module, and measuring device |
CN2746377Y (en) * | 2005-03-30 | 2005-12-14 | 成都货安计量技术中心 | Weighing sensor with IP address |
-
1996
- 1996-09-30 JP JP26005296A patent/JP3648876B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH10104052A (en) | 1998-04-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5628022A (en) | Microcomputer with programmable ROM | |
US4296464A (en) | Process control system with local microprocessor control means | |
US5835791A (en) | Versatile connection of a first keyboard/mouse interface and a second keyboard/mouse interface to a host computer | |
FI74158B (en) | KOPPLINGSANORDNING FOER GIVANDE AV STYRORDER I ETT MIKROCOMPUTERSYSTEM. | |
US20050265108A1 (en) | Memory controller which increases bus bandwidth, data transmission method using the same, and computer system having the same | |
JP3648876B2 (en) | Electronic measuring instrument | |
US4633466A (en) | Self testing data processing system with processor independent test program | |
JPH0731613B2 (en) | Diagnostic control device | |
KR960035290A (en) | Method and apparatus for bus loading distribution in a data processing system | |
JP3380827B2 (en) | Emulator device | |
US5341473A (en) | System of transferring data in a multi-CPU arrangement using address generators | |
US6110225A (en) | Inverse assembler with reduced signal requirements using a trace listing | |
JP2765659B2 (en) | Self-test method for data processing equipment | |
KR930001588B1 (en) | Processor control device | |
JPH01202113A (en) | digital protection relay device | |
JP3403932B2 (en) | Data input / output device | |
KR100451792B1 (en) | PB bus interface logic with system of ISA bus | |
JP3115130B2 (en) | Electronic exchange system | |
JP3064024B2 (en) | Line monitor for remote monitoring and control system | |
JP2000172307A (en) | Method for updating process data collection device | |
JPH01175436A (en) | Data converter and automatic system for checking and testing equipment by using group of such converters | |
JP2526907B2 (en) | Multifunction electronic scales | |
JPH0724079B2 (en) | Measurement data collection processing system | |
JP4688724B2 (en) | Functional block test circuit and integrated circuit device | |
JP2739783B2 (en) | Data transfer method between packages |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20041026 |
|
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: 20050125 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050207 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080225 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090225 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100225 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100225 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110225 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110225 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120225 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120225 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130225 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140225 Year of fee payment: 9 |
|
LAPS | Cancellation because of no payment of annual fees |