JP3996446B2 - CAN data converter - Google Patents
CAN data converter Download PDFInfo
- Publication number
- JP3996446B2 JP3996446B2 JP2002162807A JP2002162807A JP3996446B2 JP 3996446 B2 JP3996446 B2 JP 3996446B2 JP 2002162807 A JP2002162807 A JP 2002162807A JP 2002162807 A JP2002162807 A JP 2002162807A JP 3996446 B2 JP3996446 B2 JP 3996446B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- analog
- bus
- analog output
- memory
- 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 - Lifetime
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、CANバス上を流れるCANデータをアナログ信号に変換してアナログ出力ポートから出力するCANデータ変換装置に関するものである。
【0002】
【従来の技術】
車載用ネットワーク、家電製品用ネットワーク、産業制御機器用ネットワークなどのような複数の機器を接続したネットワークとして、国際規格(ISO11898)のコントロールエリアネットワーク(CAN:Controller Area Network)が知られている。CANは、その伝送レートが最高1Mbpsであり、上記した各ネットワークにおいて従来から使用されていた通信方式に比べて非常に高速であるという特徴を備えている。また、CANは、デジタル信号のハイ、ローを、ネットワーク上の二線間の差動電圧に置き換えるシリアル通信であるため、耐ノイズ性に優れているという特徴も備えている。このため、現在では多くの分野においてCANが利用されている。
【0003】
また、CANはマルチマスタ能力を備えるバスシステムであり、CANバス(以下、単に「バス」ともいう)が空いている限り、全ての機器がバス上にCAN通信パケットを送信することができる。また、複数の機器がバス上のCAN通信パケットを同時に受信することもできる(ブロードキャスティング方式)。一方、バス上を流れるCAN通信パケットは、データ長可変のフォーマット(CANデータフォーマット)で規定され、CAN通信パケットに含まれているCANデータの種別を示すID部と、CANデータの中身自体を表すデータ部とに区分けされたデータ構造を有している。この場合、ID部は、各機器を特定するためのいわゆるステーションIDではなく、データ部に含まれているCANデータの種類(一例として車載用ネットワークでは、エンジン回転数や温度など)を示したり、バス上のアクセス優先順位を決定する機能を有している。データ部は、複数のデータ領域に区切って使用可能に構成され、また各データ領域の位置やサイズは上述したようにCAN通信パケット毎に任意に設定可能となっている。しかしながら、同一のバスに接続された各機器間で通信を行う場合、各機器毎にCANデータフォーマットが異なっているときには、相手の機器がデータ領域内から所望のCANデータを抽出することができないこととなる。このため、同一のバスに接続された各機器間では、データ部におけるデータ領域の数、CANデータの種類毎のデータ領域の位置および各データ領域のサイズが共通化されて、CANデータフォーマットが統一されている。
【0004】
一方、バスに接続される各機器には、取得すべきCANデータを含むCAN通信パケットを識別する識別情報(CANデータの種類等)、そのCANデータが格納されているデータ領域の位置情報、およびそのCANデータのスケーリング情報(スケーリング値(最大値や最小値)と単位。以下、同様)を定義したCAN定義データがそれぞれ記憶されている。この場合、各機器では、バス上を流れるCAN通信パケットを受信し、受信したCAN通信パケットにおけるID部の内容と記憶されている各CAN定義データとを比較することにより、受信したCAN通信パケットが各CAN定義データにおいて定義されているCANデータを含んでいるか否かを判別する。定義されたCANデータを含んでいると判別したときには、各機器は、CAN定義データで定義されたデータ領域からCANデータを抽出する。一方、CANデータをバスに出力する際には、各機器は、出力するCANデータの種類に基づいて、ID部を構成すると共に出力すべきCANデータを所定のデータ部に格納したCAN通信パケットを生成する。次いで、バスが空いているときに、生成したCAN通信パケットをバス上に出力する。これにより、他の全ての機器が、バス上のこのCANデータを受信可能となる。
【0005】
このようなCANにおいて、バス上を流れるCAN通信パケットに含まれている所定のCANデータを観測(計測)する場合、計測の分野において従来から一般的に使用されているアナログ入力の記録計を利用できると便利である。しかしながら、この種の記録計は、バスに直接接続することができないため、通常、CANデータ変換装置を介してバスに接続される。この場合、CANデータ変換装置は、取得対象(観測対象)のCANデータを含むCAN通信パケットをバス上から受信し、そのCANデータを抽出してアナログ信号に変換した後に、このアナログ信号をアナログ出力ポートから記録計に出力する。また、通常、この種の記録計は、複数の入力ポートを備え、各入力ポートを介して入力した複数のアナログ信号を同時に観測できるように構成されている。したがって、これに対応してCANデータ変換装置も複数のアナログ出力ポートを備えている。
【0006】
また、CANデータ変換装置はメモリを有し、このメモリには、バスに接続された上記機器と同様にして、取り込むべきCANデータの種類、そのCANデータが格納されているデータ部の位置情報、およびそのCANデータのスケーリング情報を定義したCAN定義データが、各アナログ出力ポートに対応させてアナログ出力ポートの数と同数記憶されている。さらに、メモリには、取り込んだCANデータと、そのCANデータの出力先としてのアナログ出力ポートとの対応関係を示す対応データが記憶されている。この場合、これらのCAN定義データや対応データは、一般的に、これらのデータを生成させる専用のアプリケーションソフトウェアがインストールされたパソコンを使用して作成される。具体的には、パソコンにCANデータ変換装置を接続して、専用のアプリケーションソフトウェアを用いてCAN定義データや対応データを作成し、作成したこれらのデータをパソコンからCANデータ変換装置のメモリに転送する。これにより、CANデータ変換装置のメモリに上記各データが記憶される。
【0007】
このCANデータ変換装置と記録計とを用いて、バス上を流れるCAN通信パケットに含まれる所定のCANデータを観測する際には、まず、測定現場にCANデータ変換装置と記録計とを持ち込んで、バスにCANデータ変換装置を接続し、さらにCANデータ変換装置に記録計を接続する。また、記録計側では、記録計に設けられた操作部を操作して、観測すべきCANデータのスケーリング値や単位を各入力ポート毎に設定する。
【0008】
観測の際には、このCANデータ変換装置では、上記した各機器と同様にして、バス上を流れるCAN通信パケットを受信し、各CAN定義データに基づいて、取得すべきCAN通信パケットを判別し、取得すべきCAN通信パケットの場合には、そのCAN通信パケットからそのCANデータを抽出する。さらに、CANデータ変換装置では、対応データに基づいて、抽出したCANデータを各アナログ出力ポートに対応させて順次メモリに保存する。また、CANデータ変換装置では、保存したCANデータをアナログ信号に変換して、対応するアナログ出力ポートから記録計に出力する。これにより、バス上を流れるCAN通信パケットに含まれている所定のCANデータが記録計によって観測される。
【0009】
【発明が解決しようとする課題】
ところが、従来のCANデータ変換装置には、以下の問題点がある。すなわち、CANデータ変換装置のメモリに記憶されたCAN定義データは、各アナログ出力ポートに対応させてアナログ出力ポートの数と同数に規定されている。このため、例えば、測定現場において想定していなかったCANデータを取得して測定する必要性が生じた際には、CAN定義データを変更する必要がある。この際には、バスからCANデータ変換装置を取り外し、上記したパソコンにCANデータ変換装置を接続して、新たなCAN定義データと対応データとをパソコンで作成してCANデータ変換装置に転送する必要がある。したがって、CAN定義データの変更作業に長時間を要するという問題が生じる。
【0010】
本発明は、かかる問題点に鑑みてなされたものであり、取得対象のCANデータを短時間で変更し得るCANデータ変換装置を提供することを主目的とする。
【0011】
【課題を解決するための手段】
上記目的を達成すべく請求項1記載のCANデータ変換装置は、CANバスインターフェース部と、D/A変換器と、複数のアナログ出力ポートと、取得すべきCANデータを含むCAN通信パケットを識別する識別情報と共に少なくとも当該CAN通信パケットにおける前記CANデータの位置情報を定義した複数のCAN定義データおよび当該CAN通信パケットから抽出されて前記D/A変換器によってアナログ信号に変換される当該各CANデータとその出力先としての前記アナログ出力ポートとの対応関係を示す対応データを記憶するメモリと、制御部とを備え、当該制御部が、前記CANバスインターフェース部を介してCANバスから受信した前記CAN通信パケットの内から前記取得すべきCANデータを含むCAN通信パケットを前記CAN定義データを参照して判別すると共に該当する当該CAN通信パケットから当該取得すべきCANデータを当該CAN定義データを参照して抽出し、当該抽出したCANデータを前記D/A変換器に出力してアナログ信号に変換させると共に当該アナログ信号を前記対応データによって示される前記アナログ出力ポートに出力させるCANデータ変換装置であって、前記メモリは、前記アナログ出力ポートの数以上の数の前記CAN定義データを記憶可能に構成され、前記制御部は、入力されたコマンドに従って前記対応データにおける前記対応関係を変更可能に構成されている。
【0012】
請求項2記載のCANデータ変換装置は、請求項1記載のCANデータ変換装置において、前記コマンドを入力可能な操作部を備えている。
【0013】
請求項3記載のCANデータ変換装置は、請求項1記載のCANデータ変換装置において、前記コマンドを外部機器から入力可能な通信用インターフェース部を備えている。
【0014】
【発明の実施の形態】
以下、添付図面を参照して、本発明に係るCANデータ変換装置の好適な発明の実施の形態について説明する。
【0015】
最初に、CANデータ変換装置1の構成について、図面を参照して説明する。
【0016】
CANデータ変換装置1は、図1に示すように、CANバスインタフェース部11、トランシーバ12、CANコントローラ13、CPU14、メモリ15、D/A変換器16、信号切替器17、n個(nは2以上の整数)のアナログ出力ポートOP1〜OPn(以下、特に区別しないときには「アナログ出力ポートOP」ともいう)、操作キー等を備えた操作部18、および通信用インターフェース部19を備えている。
【0017】
CANバスインタフェース部11は、CANデータ変換装置1をバス21に電気的に接続する機能を備えている。なお、一例として、バス21は、図1に示すように、機器22,23,24相互間のCANデータ伝送に使用されているものとする。トランシーバ12は、バス21上の差動電圧で表されるCAN通信パケットをCANバスインタフェース部11を介して受信して、2値のデジタル信号に変換する。CANコントローラ13は、トランシーバ12によって変換されたCAN通信パケットにおけるID部およびデータ部を識別してCPU14へ転送する。メモリ15は、CPU14の動作を規定するためのプログラムを記憶する。また、メモリ15は、複数のCAN定義データと、CANデータおよびアナログ出力ポートOP1〜OPnの対応関係を示す対応データと、取得したCANデータとを記憶する。D/A変換器16は、取得したCANデータDcaをアナログ信号Saに変換して出力する。信号切替器17は、入力した選択信号Ssに従ってアナログ出力ポートOP1〜OPnのうちの1つを選択し、出力されたアナログ信号Saを選択されたアナログ出力ポートOPに出力する。操作部18は、オペレータによって操作され、CPU14に対してコマンドを入力するために使用される。通信用インターフェース部19は、記録計31やパソコン(図示せず)にCANデータ変換装置1を接続するためのものであって、例えば、RS232Cインタフェースが採用されている。CPU14は、本発明における制御部として機能し、メモリ15に記憶されたプログラムに基づいて作動して、CANデータ変換装置1内の各構成要素を制御する。
【0018】
次に、外部機器としての記録計31の構成について図面を参照して説明する。
【0019】
記録計31は、図1に示すように、N個のアナログ入力ポートIP1〜IPn(以下、特に区別しないときには「アナログ入力ポートIP」ともいう)、A/D変換器ADC1〜ADCn(以下、特に区別しないときには「A/D変換器ADC」ともいう)、メモリ制御部32、ストレージメモリ33、内部メモリ34、CPU35、表示部36、通信用インターフェース部37、および操作部38を備えている。この場合、各A/D変換器ADC1〜ADCnは、各アナログ入力ポートIP1〜IPnに対応して同数配設され、対応するアナログ入力ポートIPを介して入力されるアナログ信号をディジタルデータに変換して出力する。メモリ制御部32は、各A/D変換器ADC1〜ADCnによって出力されたディジタルデータを、各アナログ入力ポートIPに対応させてストレージメモリ33に順次保存する。内部メモリ34は、CPU35の動作を規定するプログラムを記憶する。また、内部メモリ34は、各アナログ入力ポートIP毎のCANデータのスケーリング情報(スケーリング値や単位)を記憶する。表示部36は、入力した表示データをアナログ表示する。通信用インターフェース部37は、CANデータ変換装置1の通信用インタフェース部19と同一のインタフェースで構成され(一例としてRS232Cインタフェース)、記録計31にCANデータ変換装置1を接続するために使用される。CPU35は、内部メモリ34に記憶されたプログラムに基づいて作動して、記録計31内の各構成要素を制御する。操作部38は、各種操作キー等によって構成されている。
【0020】
続いて、各機器22,23,24によって出力されてバス21上を流れるCAN通信パケットに含まれるCANデータをCANデータ変換装置1と記録計31とを用いて観測する例について説明する。
【0021】
まず、CANデータ変換装置1を通信用インターフェース部19を介してパソコン(図示せず)に接続し、次いでアプリケーションソフトウェアを起動してCAN定義データDdeや対応データDcoを作成し、作成したこれらのデータDde,DcoをパソコンからCANデータ変換装置1に転送する。CANデータ変換装置1では、CPU14が通信用インターフェース部19を介してこれらのデータDde,Dcoを受信して、メモリ15に記憶させる。この場合、パソコンを用いて、従来と同様にして、アナログ出力ポートOP1〜OPnの数と同数のCAN定義データDdeを作成すると共に、これらのCAN定義データDdeと各アナログ出力ポートOP1〜OPnとの対応関係を示す対応データDcoを生成する。さらに、観測の可能性があるCANデータについてのCAN定義データDdeを予備のCAN定義データDdeとして作成する。この予備のCAN定義データDdeは、現段階ではいずれのアナログ出力ポートOPにも対応していないため、対応データDcoには含まれていないものの、対応データDcoに含まれているCAN定義データDdeと同様にしてメモリ15に記憶される。
【0022】
次いで、パソコンからCANデータ変換装置1を外して、記録計31と共に、観測しようとするバス21の設置場所に搬送し、CANデータ変換装置1をバス21に接続すると共に、記録計31をCANデータ変換装置1に接続する。この場合、CANデータ変換装置1の各アナログ出力ポートOP1〜OPnを記録計31の各アナログ入力ポートIP1〜IPnに一対一でそれぞれ接続する。また、CANデータ変換装置1の通信用インターフェース部19と記録計31の通信用インターフェース部37とを伝送路としてのインターフェースケーブルCBで接続する。
【0023】
この状態で、CANデータ変換装置1および記録計31の電源を投入する。この際に、CANデータ変換装置1は、最初に、図2に示すスケーリング情報転送処理を実行して、CANデータ変換装置1のメモリ15に記憶されている各CAN定義データDdeに含まれているスケーリング情報DscをインターフェースケーブルCBを介して記録計31に転送する。
【0024】
具体的には、図2に示すように、CANデータ変換装置1のCPU14が、記録計31のCPU35と通信可能か否かを判別する(ステップ101)。この場合、CPU14は、通信可能な状態でないと判別したときには、スケーリング情報Dscの送信処理を終了する。一方、通信可能であると判別したときには、CPU14は、メモリ15に記憶されているCAN定義データDdeのうち、対応データDcoによって各アナログ出力ポートOP1〜OPnと対応付け(割り当て)られている各CAN定義データDdeをメモリ15から読み出す(ステップ102)。次いで、CPU14は、読み出したCAN定義データDdeに含まれているスケーリング情報Dscを抽出し、抽出したスケーリング情報Dscをこのスケーリング情報Dscが適用されるアナログ出力ポートOPの識別データ(例えば、対応ポート番号)と共に、通信用インターフェース部19、インターフェースケーブルCBおよび通信用インターフェース部37を介してCPU35に転送する(ステップ103)。つまり、CPU14は、各アナログ出力ポートOP1〜OPnとそれぞれ対応関係を有する各CANデータDcaに関する各スケーリング情報DscをCPU35に出力する。また、CPU14は、対応データDcoによって各アナログ出力ポートOP1〜OPnと対応付けられている各CAN定義データDdeのうち、スケーリング情報Dscを抽出していないものが残っているか否かを判別し(ステップ104)、残っているものがある場合には、上記ステップ102〜103を繰り返し実行する。これにより、CPU14は、各アナログ出力ポートOP1〜OPnにそれぞれ対応付けられている各CAN定義データDdeのスケーリング情報Dscをすべて記録計31に転送する。一方、記録計31では、CPU35が、転送された各スケーリング情報Dscおよび識別データを内部メモリ34に記憶させる。
【0025】
次いで、CANデータ変換装置1では、CANコントローラ13が、CANバスインタフェース部11およびトランシーバ12を介して受信したCAN通信パケットのID部およびデータ部を識別してCPU14へ転送する。CPU14は、このCAN通信パケットのID部の内容とメモリ15に記憶されている各CAN定義データDdeとを比較することによって、転送されてきたCAN通信パケットに各CAN定義データにおいて定義されているCANデータが含まれているか否かを判別する。CPU14は、この定義されているCANデータを含んでいると判別したときには、CAN通信パケットからCANデータDcaを抽出すると共に、対応データDcoを参照して、抽出したCANデータDcaを各アナログ出力ポートOP1〜OPnに対応させてメモリ15に保存する。CPU14は、これらのCANデータDcaの判別、抽出、および保存の各動作を繰り返し実施する。また、CPU14は、メモリ15に保存した各アナログ出力ポートOP1〜OPn毎のCANデータDcaが所定のデータ量に達したか否かを繰り返し検出し、所定のデータ量に達したアナログ出力ポートOPに対応するCANデータDcaをメモリ15から読み出してD/A変換器16に出力する。同時に、CPU14は、信号切替器17に選択信号Ssを出力することにより、所定のデータ量に達したCANデータDcaに対応するアナログ出力ポートOPを信号切替器17の出力先として設定する。これにより、D/A変換器16によって生成されたアナログ信号Saは、対応するアナログ出力ポートOPから出力される。
【0026】
記録計31では、各A/D変換器ADCが、各アナログ入力ポートIPを介して取り込んだアナログ信号Saをそれぞれディジタルデータに変換してメモリ制御部32に出力する。メモリ制御部32は、これらのディジタルデータを各アナログ入力ポートIPに対応させてストレージメモリ33に順次保存する。CPU35は、一例として、アナログ入力ポートIP1〜IPnの順に対応するディジタルデータをメモリ制御部32に対して要求する。メモリ制御部32は、CPU35の要求に応じて、ストレージメモリ33に保存したアナログ入力ポートIP1〜IPnに対応する各ディジタルデータをCPU35に順次出力する。CPU35は、入力した各ディジタルデータを表示データDdsに変換して表示部36に出力する。また、CPU35は、内部メモリ34からスケーリング情報Dscを読み出して表示部36に出力する。一方、表示部36は、表示データDdsをアナログ表示させると共に、スケーリング情報Dscに基づいてスケーリング値およびその単位を表示する。これにより、記録計31によるバス21上のCANデータの正確な観測が行われる。
【0027】
次いで、取得対象のCANデータを変更する方法について説明する。
【0028】
まず、操作部18を操作してCPU14に対して対応データ変更用のコマンドを入力する。CPU14は、入力されたコマンドの内容に従い、CANデータDcaとアナログ出力ポートOPとの対応関係を変更する。具体的には、例えば、5個のアナログ出力ポートOP1〜OP5に対して、12個のCAN定義データDde1〜Dde12を予めメモリ15に記憶させた例について説明する。この場合、これらの各CAN定義データDde1〜Dde12がそれぞれCANデータDca1〜Dca12を取得対象として定義し、かつ変更前の対応データDcoとして、(OP1,Dde1)、(OP2,Dde2)、(OP3,Dde3)、(OP4,Dde4)、(OP5,Dde5)との内容がメモリ15に記録されているとする。なお、上記の(OPM,DdeL)は、アナログ出力ポートOPMにCAN定義データDdeLを対応させることを意味する(M,Lは整数)。この場合、例えば、CANデータDca4およびCANデータDca5に代えて、CANデータDca11およびCANデータDca12をそれぞれ取得対象に変更するとの内容のコマンドを入力する。この際には、CPU14は、新たな対応データ、(OP1,Dde1)、(OP2,Dde2)、(OP3,Dde3)、(OP4,Dde11)、(OP5,Dde12)を生成してメモリ15に記憶させる。この後、CPU14は、上記のスケーリング情報転送処理を実行した後、変更後の対応データに従い、上記したCANデータDcaの判別、抽出、保存および出力の各動作を繰り返し実行する。
【0029】
このように、このCANデータ変換装置1によれば、アナログ出力ポートOP1〜OPnの数以上の数のCAN定義データDdeをメモリ15に予め記憶させ、操作部18を介してコマンドを入力してCANデータDcaとアナログ出力ポートOPとの対応関係を変更することで、CANデータ変換装置1をパソコンに再度接続して、そのパソコンを使用して生成した新たなCAN定義データDdeをCANデータ変換装置1に転送するという従来の方法とは異なり、これらの作業を省くことができるため、取得対象としていなかったCANデータDcaを取得対象としていたCANデータDcaの一部または全部と入れ替えるというCANデータDcaとその出力先としてのアナログ出力ポートOPとの対応関係を短時間でしかも容易に変更することができる。つまり、予め記憶させてあるCAN定義データDdeのうちの任意のCAN定義データDdeを任意のアナログ出力ポートOPに短時間でしかも容易に対応させることができる。この結果、CANデータDcaを観測対象とする場合には、その観測作業の効率を十分に高めることができる。
【0030】
また、取得対象として定義されているCANデータDcaに関するスケーリング情報(言い換えれば、CANデータDcaに基づいて生成されたアナログ信号Saに関するスケーリング情報)Dscを含んでCAN定義データDdeが構成され、CANデータ変換装置1のCPU14が、CAN定義データDdeに含まれているCANデータDcaであって、各アナログ出力ポートOP1〜OPnとそれぞれ対応関係を有する各CANデータDcaに関する各スケーリング情報Dscを通信用インターフェース部19を介して記録計31に出力することにより、記録計31が、スケーリング情報Dscを各アナログ入力ポートIP1〜IPnに対応させて内部メモリ34に自動的に記憶させることができる。したがって、従来の記録計とは異なり、操作部を操作することなく各アナログ入力ポートIP1〜IPnに対するスケーリング情報を自動的に設定することができるため、記録計31の操作を簡略化することができる。この結果、CANバス21におけるCANデータDcaの観測作業に要する時間を十分に短縮することができる。さらに、CANデータ変換装置1に対してスケーリング情報Dscを1回設定するだけでよいため、CANデータ変換装置1のスケーリング情報Dscの設定内容と記録計31のスケーリング情報Dscの設定内容とが相違するという設定ミスを確実に防止することができる。
【0031】
なお、本発明は、上記した本発明の実施の形態に示した構成に限定されない。例えば、本発明の実施の形態では、CANデータ変換装置1に設けられた操作部18を介して対応データ変更用のコマンドを入力する例を挙げて説明したが、インターフェースケーブルCBによってCANデータ変換装置1と接続された記録計31側から、対応データ変更用のコマンドを入力することもできる。この場合には、記録計31に設けられた操作部38を操作して、対応データ変更用のコマンドをCPU35に入力する。CPU35は、インターフェースケーブルCBを介してCANデータ変換装置1にこのコマンドを送信する。そして、CANデータ変換装置1のCPU14は、通信用インターフェース部19を介して記録計31によって送信されたコマンドを受信する。その後、CPU14は、操作部18によってコマンドが入力された場合と同様にして作動して、CANデータDcaとその出力先としてのアナログ出力ポートOPとの対応関係を変更する。この構成によれば、記録計31でCANデータDcaを観測しながら、取得対象のCANデータDcaを変更することができる。したがって、CANデータ変換装置1と記録計31とが離れて設置されている場合において、CANデータ変換装置1側に移動する手間が省けるため、観測作業の操作性を向上させることができる。また、本発明の実施の形態では、CANデータ変換装置1に接続される外部機器として記録計31を例に挙げて説明したが、CANデータ変換装置1は記録計31以外の機器に対しても使用することができるのは勿論である。
【0032】
【発明の効果】
以上のように、請求項1記載のCANデータ変換装置によれば、アナログ出力ポートの数以上の数のCAN定義データをメモリに記憶させ、制御部が入力されたコマンドに従って対応データにおける対応関係を変更することにより、CANデータ変換装置のパソコンへの再度接続や、パソコンを使用して生成した新たなCAN定義データのCANデータ変換装置への転送などの作業を省くことができるため、取得対象としていなかったCANデータを取得対象としていたCANデータの一部または全部と入れ替えるというCANデータとその出力先としてのアナログ出力ポートとの対応関係を短時間でしかも容易に変更することができる。つまり、予め記憶させてあるCAN定義データのうちの任意のCAN定義データを任意のアナログ出力ポートに短時間でしかも容易に対応させることができる。この結果、例えば、CANデータを観測する場合には、その観測作業の効率を十分に高めることができる。
【0033】
また、請求項2記載のCANデータ変換装置によれば、対応関係を変更するためのコマンドを入力可能な操作部を備えたことにより、対応関係変更用の機器を用いることなく、CANデータ変換装置単独でCANデータとアナログ出力ポートとの対応関係を変更することができる。
【0034】
また、請求項3記載のCANデータ変換装置によれば、対応関係を変更するためのコマンドを外部機器から入力可能な通信用インターフェース部を備えたことにより、CANデータとアナログ出力ポートとの対応関係の変更を外部機器側で遠隔操作することができる。したがって、例えば、外部機器が記録計の場合には、CANデータを観測しつつ対応関係を変更することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係るCANデータ変換装置1、CANデータ変換装置1が接続されるバス21、および記録計31の構成を示す構成図である。
【図2】記録計31に対してスケーリング情報Dscを転送するCANデータ変換装置1によるスケーリング情報転送処理のフローチャートである。
【符号の説明】
1 CANデータ変換装置
11 CANバスインタフェース部
12 トランシーバ
13 CANコントローラ
14 CPU
15 メモリ
16 D/A変換器
17 信号切替器
18 操作部
Dca CANデータ
Dde CAN定義データ
OP1〜OPn アナログ出力ポート
Sa アナログ信号[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a CAN data converter for converting CAN data flowing on a CAN bus into an analog signal and outputting the analog signal from an analog output port.
[0002]
[Prior art]
A control area network (CAN: Controller Area Network) of an international standard (ISO11898) is known as a network in which a plurality of devices such as an in-vehicle network, a home appliance network, and an industrial control device network are connected. The CAN has a feature that its transmission rate is 1 Mbps at the maximum, and it is very high-speed compared with the communication method conventionally used in each network described above. In addition, since CAN is serial communication that replaces the high and low of a digital signal with a differential voltage between two wires on the network, it also has a feature of excellent noise resistance. For this reason, CAN is currently used in many fields.
[0003]
CAN is a bus system having multi-master capability, and all devices can transmit CAN communication packets on the bus as long as the CAN bus (hereinafter simply referred to as “bus”) is available. Also, a plurality of devices can simultaneously receive CAN communication packets on the bus (broadcasting method). On the other hand, the CAN communication packet flowing on the bus is defined by a variable data length format (CAN data format), and represents an ID part indicating the type of CAN data included in the CAN communication packet and the content of the CAN data itself. It has a data structure divided into a data part. In this case, the ID part is not a so-called station ID for specifying each device, but indicates the type of CAN data included in the data part (for example, in the vehicle-mounted network, the engine speed, temperature, etc.) It has the function of determining the access priority on the bus. The data part is configured to be usable by being divided into a plurality of data areas, and the position and size of each data area can be arbitrarily set for each CAN communication packet as described above. However, when communicating between devices connected to the same bus, if the CAN data format is different for each device, the partner device cannot extract the desired CAN data from the data area. It becomes. For this reason, between the devices connected to the same bus, the number of data areas in the data section, the position of the data area for each type of CAN data, and the size of each data area are standardized, and the CAN data format is unified. Has been.
[0004]
On the other hand, each device connected to the bus has identification information (a type of CAN data, etc.) for identifying a CAN communication packet including CAN data to be acquired, position information of a data area in which the CAN data is stored, and CAN definition data defining scaling information of the CAN data (scaling value (maximum value or minimum value) and unit; hereinafter the same) is stored. In this case, each device receives the CAN communication packet flowing on the bus, and compares the content of the ID part in the received CAN communication packet with each stored CAN definition data, so that the received CAN communication packet is It is determined whether or not CAN data defined in each CAN definition data is included. When it is determined that the defined CAN data is included, each device extracts the CAN data from the data area defined by the CAN definition data. On the other hand, when outputting CAN data to the bus, each device configures an ID portion and, based on the type of CAN data to be output, a CAN communication packet in which CAN data to be output is stored in a predetermined data portion. Generate. Next, when the bus is free, the generated CAN communication packet is output on the bus. As a result, all other devices can receive the CAN data on the bus.
[0005]
In such a CAN, when observing (measuring) predetermined CAN data included in a CAN communication packet flowing on a bus, an analog input recorder generally used in the field of measurement is used. It is convenient if you can. However, since this type of recorder cannot be directly connected to the bus, it is usually connected to the bus via a CAN data converter. In this case, the CAN data conversion device receives a CAN communication packet including CAN data to be acquired (observation target) from the bus, extracts the CAN data, converts the CAN data into an analog signal, and then outputs the analog signal to the analog output. Output from the port to the recorder. In general, this type of recorder is provided with a plurality of input ports so that a plurality of analog signals input through the input ports can be observed simultaneously. Accordingly, the CAN data conversion apparatus also has a plurality of analog output ports corresponding to this.
[0006]
Further, the CAN data conversion device has a memory, and in this memory, in the same manner as the above-mentioned device connected to the bus, the type of CAN data to be taken in, the position information of the data part in which the CAN data is stored, The CAN definition data defining the scaling information of the CAN data is stored in the same number as the number of analog output ports corresponding to each analog output port. Further, the memory stores correspondence data indicating the correspondence between the fetched CAN data and the analog output port as the output destination of the CAN data. In this case, these CAN definition data and corresponding data are generally created using a personal computer in which dedicated application software for generating these data is installed. Specifically, a CAN data converter is connected to a personal computer, CAN definition data and corresponding data are created using dedicated application software, and the created data is transferred from the personal computer to the memory of the CAN data converter. . Thereby, each said data is memorize | stored in the memory of a CAN data converter.
[0007]
When observing predetermined CAN data included in a CAN communication packet flowing on the bus using this CAN data conversion device and recorder, first, bring the CAN data converter and recorder into the measurement site. The CAN data converter is connected to the bus, and the recorder is connected to the CAN data converter. On the recorder side, the operation unit provided in the recorder is operated to set the scaling value and unit of the CAN data to be observed for each input port.
[0008]
At the time of observation, this CAN data converter receives a CAN communication packet flowing on the bus in the same manner as each device described above, and determines a CAN communication packet to be acquired based on each CAN definition data. In the case of a CAN communication packet to be acquired, the CAN data is extracted from the CAN communication packet. Further, in the CAN data conversion device, the extracted CAN data is sequentially stored in the memory in correspondence with each analog output port based on the corresponding data. The CAN data converter converts the stored CAN data into an analog signal and outputs the analog signal to the recorder from the corresponding analog output port. As a result, predetermined CAN data included in the CAN communication packet flowing on the bus is observed by the recorder.
[0009]
[Problems to be solved by the invention]
However, the conventional CAN data converter has the following problems. That is, the CAN definition data stored in the memory of the CAN data conversion device is defined in the same number as the number of analog output ports corresponding to each analog output port. For this reason, for example, when it becomes necessary to acquire and measure CAN data that was not assumed at the measurement site, it is necessary to change the CAN definition data. In this case, it is necessary to remove the CAN data conversion device from the bus, connect the CAN data conversion device to the above personal computer, create new CAN definition data and corresponding data on the personal computer, and transfer them to the CAN data conversion device. There is. Therefore, there is a problem that it takes a long time to change the CAN definition data.
[0010]
The present invention has been made in view of such problems, and a main object of the present invention is to provide a CAN data conversion device that can change CAN data to be acquired in a short time.
[0011]
[Means for Solving the Problems]
To achieve the above object, a CAN data converter according to claim 1 identifies a CAN bus interface unit, a D / A converter, a plurality of analog output ports, and a CAN communication packet including CAN data to be acquired. A plurality of CAN definition data defining at least the position information of the CAN data in the CAN communication packet together with the identification information, and each CAN data extracted from the CAN communication packet and converted into an analog signal by the D / A converter; The CAN communication received from the CAN bus via the CAN bus interface unit via a CAN bus interface unit, and a memory that stores correspondence data indicating a correspondence relationship with the analog output port as the output destination CAN communication parameters including the CAN data to be acquired from the packet. The CAN data to be acquired is extracted from the corresponding CAN communication packet with reference to the CAN definition data, and the extracted CAN data is converted to the D / A conversion. A CAN data converter for outputting the analog signal to an analog signal and outputting the analog signal to the analog output port indicated by the corresponding data, wherein the memory has a number equal to or greater than the number of the analog output ports. The CAN definition data can be stored, and the control unit can be configured to change the correspondence in the correspondence data according to an input command.
[0012]
According to a second aspect of the present invention, there is provided a CAN data conversion device according to the first aspect, further comprising an operation unit capable of inputting the command.
[0013]
According to a third aspect of the present invention, there is provided a CAN data conversion device according to the first aspect, further comprising a communication interface unit capable of inputting the command from an external device.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, exemplary embodiments of a CAN data conversion device according to the invention will be described with reference to the accompanying drawings.
[0015]
First, the configuration of the CAN data conversion apparatus 1 will be described with reference to the drawings.
[0016]
As shown in FIG. 1, the CAN data converter 1 includes a CAN
[0017]
The CAN
[0018]
Next, the configuration of the
[0019]
As shown in FIG. 1, the
[0020]
Next, an example in which CAN data included in a CAN communication packet output from each
[0021]
First, the CAN data conversion device 1 is connected to a personal computer (not shown) via the
[0022]
Next, the CAN data conversion device 1 is removed from the personal computer and transported together with the
[0023]
In this state, the CAN data converter 1 and the
[0024]
Specifically, as shown in FIG. 2, the
[0025]
Next, in the CAN data conversion apparatus 1, the
[0026]
In the
[0027]
Next, a method for changing the acquisition target CAN data will be described.
[0028]
First, the
[0029]
As described above, according to the CAN data conversion apparatus 1, the CAN definition data Dde as many as the number of the analog output ports OP1 to OPn is stored in the
[0030]
Further, the CAN definition data Dde is configured including scaling information related to the CAN data Dca defined as an acquisition target (in other words, scaling information related to the analog signal Sa generated based on the CAN data Dca) Dsc, and CAN data conversion is performed. The
[0031]
The present invention is not limited to the configuration shown in the above-described embodiment of the present invention. For example, in the embodiment of the present invention, the example in which the command for changing the corresponding data is input via the
[0032]
【The invention's effect】
As described above, according to the CAN data conversion device of the first aspect, the number of CAN definition data equal to or greater than the number of analog output ports is stored in the memory, and the correspondence relationship in the corresponding data is determined according to the command input by the control unit. By changing, it is possible to save work such as reconnecting the CAN data conversion device to the personal computer and transferring new CAN definition data generated using the personal computer to the CAN data conversion device. It is possible to easily change the correspondence relationship between the CAN data and the analog output port as the output destination of replacing the CAN data that has not been replaced with a part or all of the CAN data to be acquired in a short time. That is, any CAN definition data stored in advance can be easily associated with any analog output port in a short time. As a result, for example, when observing CAN data, the efficiency of the observation work can be sufficiently increased.
[0033]
According to the CAN data conversion device of the second aspect, since the operation unit capable of inputting a command for changing the correspondence relationship is provided, the CAN data conversion device can be used without using a device for changing the correspondence relationship. The correspondence between CAN data and analog output ports can be changed independently.
[0034]
Further, according to the CAN data conversion apparatus of the third aspect, the correspondence relationship between the CAN data and the analog output port is provided by providing the communication interface unit capable of inputting a command for changing the correspondence relationship from an external device. Can be remotely controlled on the external device side. Therefore, for example, when the external device is a recorder, the correspondence can be changed while observing the CAN data.
[Brief description of the drawings]
FIG. 1 is a configuration diagram showing a configuration of a CAN data conversion device 1, a
FIG. 2 is a flowchart of scaling information transfer processing by the CAN data conversion apparatus 1 that transfers scaling information Dsc to the
[Explanation of symbols]
1 CAN data converter
11 CAN bus interface
12 Transceiver
13 CAN controller
14 CPU
15 memory
16 D / A converter
17 Signal selector
18 Operation unit
Dca CAN data
Dde CAN definition data
OP1 to OPn Analog output port
Sa Analog signal
Claims (3)
前記メモリは、前記アナログ出力ポートの数以上の数の前記CAN定義データを記憶可能に構成され、
前記制御部は、入力されたコマンドに従って前記対応データにおける前記対応関係を変更可能に構成されているCANデータ変換装置。The CAN bus interface unit, the D / A converter, the plurality of analog output ports, and identification information for identifying the CAN communication packet including the CAN data to be acquired, and at least the position information of the CAN data in the CAN communication packet is defined. A plurality of CAN definition data and correspondence data indicating correspondence between each CAN data extracted from the CAN communication packet and converted into an analog signal by the D / A converter and the analog output port as the output destination A CAN memory packet including CAN data to be acquired from the CAN communication packet received from the CAN bus via the CAN bus interface unit. Recognize by referring to CAN definition data The CAN data to be acquired is extracted from the CAN communication packet with reference to the CAN definition data, and the extracted CAN data is output to the D / A converter and converted into an analog signal, and the analog signal is converted into the analog signal. A CAN data conversion device for outputting to the analog output port indicated by corresponding data,
The memory is configured to be able to store the CAN definition data in a number equal to or greater than the number of the analog output ports.
The CAN data conversion device configured such that the control unit can change the correspondence relationship in the correspondence data in accordance with an input command.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002162807A JP3996446B2 (en) | 2002-06-04 | 2002-06-04 | CAN data converter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002162807A JP3996446B2 (en) | 2002-06-04 | 2002-06-04 | CAN data converter |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004015174A JP2004015174A (en) | 2004-01-15 |
JP3996446B2 true JP3996446B2 (en) | 2007-10-24 |
Family
ID=30431453
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002162807A Expired - Lifetime JP3996446B2 (en) | 2002-06-04 | 2002-06-04 | CAN data converter |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3996446B2 (en) |
-
2002
- 2002-06-04 JP JP2002162807A patent/JP3996446B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2004015174A (en) | 2004-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7158488B2 (en) | Communication control apparatus and method | |
US7024508B2 (en) | Bus station with integrated bus monitor function | |
US20150142992A1 (en) | Device and Method for Addressing, and Converter | |
JP2002016613A (en) | Electronic equipment, electronic equipment system and communication control method | |
US7209868B2 (en) | Signal monitoring system and method | |
US6331822B1 (en) | Communication control apparatus | |
JP3996446B2 (en) | CAN data converter | |
JP2006254045A (en) | Serial bus data collecting device and data collection system | |
CN111263935B (en) | Communication system for automation and process engineering and Y-switch unit for such a communication system | |
US7761271B2 (en) | Method, device and system for displaying data of a machine control system | |
JP2004015176A (en) | Can data converter | |
JP2005051661A (en) | Wireless lan terminal | |
US20120179424A1 (en) | Sensor and sensor network and method for the operation thereof | |
US8081652B2 (en) | Integrated universal input-output interface circuit | |
JP3110319B2 (en) | Load test equipment for packet data communication | |
JP4045907B2 (en) | Data conversion system | |
JP2508920B2 (en) | Configuration change method | |
US7515077B2 (en) | Apparatus and method for monitoring analog peripheral devices by a processing unit | |
JPS62285126A (en) | Picture output system | |
US7557745B2 (en) | Apparatus and method for managing access to the analog-to-digital conversion results | |
JPH09200205A (en) | Method and device for managing network | |
JP2008042928A (en) | Converter | |
JP2005164432A (en) | Signal wire changeover connector and signal wire inspection system | |
KR100508588B1 (en) | Integrated Jig Test Method for I / O Interface Blocks of Electronic Switching System | |
JP2000111620A (en) | Ic tester |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050602 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070427 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070515 |
|
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: 20070731 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070802 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100810 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 3996446 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100810 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100810 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120810 Year of fee payment: 5 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120810 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140810 Year of fee payment: 7 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |