mg40 seriesmg40 series (j) 1-3 1-3. 実行結果とエラー...

144
MG40 Series コマンドリファレンスマニュアル / Command Reference Manual MG40 シリーズ計測システム / MG40 Series Measuring System 本マニュアルは MG40 シリーズの設定 / 操作 / データ取得を行なうソフトウェアを作成 するためのコマンドを解説したものです。作成されたソフトウェアの使用方法について は、ソフトウェア付属の取扱説明書等をご覧になるか、販売元・配付元にお問い合わせ ください。 装置の接続や取扱方法などのコマンド解説以外の内容については、別途取扱説明書をご 参照ください。 This manual describes the commands used to create software for establishing the settings for the MG40 series to perform operations and for acquiring data from the series. For details on how to use the software created with these commands, refer to the operating instructions provided with the software or contact your dealer/distributor. For details on aspects other than descriptions of the commands such as how to connect and operate the unit, refer to the instruction manual provided separately.

Upload: others

Post on 05-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

MG40 Series

コマンドリファレンスマニュアル / Command Reference Manual

MG40シリーズ計測システム / MG40 Series Measuring System

本マニュアルは MG40 シリーズの設定 / 操作 / データ取得を行なうソフトウェアを作成するためのコマンドを解説したものです。作成されたソフトウェアの使用方法については、ソフトウェア付属の取扱説明書等をご覧になるか、販売元・配付元にお問い合わせください。装置の接続や取扱方法などのコマンド解説以外の内容については、別途取扱説明書をご参照ください。

This manual describes the commands used to create software for establishing the settings for the MG40 series to perform operations and for acquiring data from the series. For details on how to use the software created with these commands, refer to the operating instructions provided with the software or contact your dealer/distributor.For details on aspects other than descriptions of the commands such as how to connect and operate the unit, refer to the instruction manual provided separately.

Page 2: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

MG40 Series

Page 3: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

MG40 Series

目次

1. 概要 ........................................................................................1-1. コマンド概要 .........................................................................................

1-1-1. 設定コマンドと取得コマンド ..............................................1-1-2. コマンド分類 .........................................................................

1-2. コマンド文法 .........................................................................................1-3. 実行結果とエラー ..................................................................................

2. イーサネットインタフェース ..............................................2-1. イーサネットインタフェース概要 .......................................................2-2. イーサネットインタフェースへの接続 ...............................................

2-2-1. コマンドインタフェースへの接続 ......................................2-3. 初期設定手順 .........................................................................................2-4. 設定例 .....................................................................................................

2-4-1. 接続 ........................................................................................2-4-2. 計測条件の設定 .....................................................................2-4-3. 計測の開始 .............................................................................

2-5. コマンドインタフェースとデータインタフェースを併用する場合 ....2-5-1. 計測条件の設定 .....................................................................2-5-2. 計測の開始 .............................................................................

3. CC-Link インタフェース ......................................................3-1. CC-Link インタフェース概要 ..............................................................3-2. CC-Link アドレスマップ......................................................................3-3. CC-Link コマンド送信手順 ..................................................................

4. コマンドリファレンス ..........................................................4-1. コマンド一覧 .........................................................................................4-2. コマンド表の見方 ..................................................................................4-3. 操作コマンド .........................................................................................4-4. セットアップコマンド ......................................................................... 4

5. データフォーマット .............................................................5-1. データフォーマット概要 ......................................................................5-2. アスキーデータ ......................................................................................5-3. バイナリデータ ......................................................................................

6. エラーコード .........................................................................6-1. エラーコード概要 ..................................................................................6-2. エラーコード表 ......................................................................................

1-1. 1-1. 1-1. 1-1

(J) i

. 1-2

. 1-3

2-1. 2-1. 2-2. 2-2. 2-3. 2-4. 2-4. 2-4. 2-6. 2-7. 2-7. 2-8

3-1. 3-1. 3-2. 3-3

4-1. 4-1. 4-3. 4-4-18

5-1. 5-1. 5-1. 5-3

6-1. 6-1. 6-1

Page 4: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

ii (J) MG40 Series

Page 5: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 1-1MG40 Series

1. 概要

本マニュアルは、日本国内で使用するときのマニュアルです。

1-1. コマンド概要コマンドとは、コンピュータや PLC から MG40 シリーズに対して、動作を指示したり情報を取得したりするために使用するコントロール用の言語のことです。コマンドを正しく使用することにより、MG40 シリーズの設定や操作の指示、ステータスや計測結果の取得などを行なうことができます。

1-1-1. 設定コマンドと取得コマンド

設定コマンドとは、MG41 に設定や操作の指示を行なうコマンドです。取得コマンドとは、MG41 から情報やデータを取得するコマンドです。

MG41 に送信する情報 MG41 から返信される情報

設定コマンド 設定パラメータ ∗ 実行結果

取得コマンド 取得に必要なパラメータ ∗ 情報 / データ    ∗コマンドによってはパラメータが存在しない場合があります。

参考設定コマンドの実行結果を返信しないように設定することもできます。

→ CRP コマンド

1-1-2. コマンド分類

コマンドグループコマンドグループ : 使用目的や場面によるコマンド分類

コマンドグループ 目的

セットアップコマンド 計測の前準備などの基本設定

操作コマンド 計測中の操作、設定

データ要求コマンド 計測結果データの取得

コマンドターゲットコマンドターゲット : コマンドの対象やコマンドが影響する範囲

コマンドターゲット

システム全体

測定軸

測長ユニット

Page 6: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

1-2 (J) MG40 Series

1-2. コマンド文法

グループ ターゲット 送信 返信

セットアップコマンド / 操作コマンド

システム全体 設定 ■■■ = ◆ CR LF 実行結果

取得 ■■■ ? CR LF ■■■ = ◆ CR LF

測定軸 / 測長ユニット

設定 ■■■ 指定軸 = ◆ CR LF 実行結果

取得 ■■■ 指定軸 ? CR LF ■■■ 指定軸 = ◆ CR LF

データ要求コマンド

測定軸 取得 R CR LF →データフォーマット

r 指定軸 CR LF →データフォーマット

■■■ : コマンド

◆ : 設定値 / パラメータ

CR LF : 改行 (CR + LF)

指定軸 : 指定軸 [ □□□ ] ユニット指定 軸指定

∗: 全て対象

[∗∗∗] = 全軸 [00∗] = MG41 メインユニットの全軸 [01∗] = MG42 ハブユニット #01 の全軸 [02∗] = MG42 ハブユニット #02 の全軸 ・  ・ ・  ・ ・  ・ [31∗] = MG42 ハブユニット #31 の全軸

[00A] = MG41 メインユニットの A 軸 [00B] = MG41 メインユニットの B 軸 [00C] = MG41 メインユニットの C 軸 [00D] = MG41 メインユニットの D 軸

[01A] = MG42 ハブユニット #01 の A 軸 [01B] = MG42 ハブユニット #01 の B 軸 [01C] = MG42 ハブユニット #01 の C 軸 [01D] = MG42 ハブユニット #01 の D 軸 ・  ・ ・  ・ ・  ・ [31A] = MG42 ハブユニット #31 の A 軸 [31B] = MG42 ハブユニット #31 の B 軸 [31C] = MG42 ハブユニット #31 の C 軸 [31D] = MG42 ハブユニット #31 の D 軸

パラメータが存在しないコマンドの場合は、“ = ◆”を省略します。

Page 7: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 1-3MG40 Series

1-3. 実行結果とエラー設定コマンドと取得コマンドを送信すると、MG41 メインユニットはコマンドの文法やパラメータを確認し、返信を行ないます。

正常に実行された場合 エラーを検出した場合

設定コマンド 実行した後に実行結果を返信 エラーを返信

取得コマンド 取得結果を返信 エラーを返信   

実行結果5 文字 + CR LF の固定長で返信されます。

例 ) ER212 ( エラー発生、エラー、モードエラー )

実行結果OKまたはエラーOK : 正常終了ER : エラー発生

エラーレベル0 : 正常終了 / 了解 2 : エラー3 : 致命的なエラー

エラーコード ( エラーコードについては

「6. エラーコード」参照 )

OK000 ( 正常終了、正常終了 / 了解、エラーなし / 追加情報なし )

Page 8: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

1-4 (J) MG40 Series

Page 9: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 2-1MG40 Series

2. イーサネットインタフェース

2-1. イーサネットインタフェース概要MG41 メインユニットのイーサネットインタフェースは、2 種類のインタフェースをサポートしています。コマンドインタフェースへの接続は必須です。

名称 プロトコル使用目的

コマンド送受信 データ取得

コマンドインタフェース telnet またはTCP

可能 データ取得コマンドを使用したアスキーデータの逐次取得

データインタフェース TCP または UDP 不可能 バイナリデータの連続転送

作成するソフトウェアの仕様に応じて使用してください。

コマンドインタフェースのみを使用する

・ 接続が単純。・ データやコマンドがアスキー形式のためシンプルなシステムが構成で きる。・ データ転送レートは、データインターフェース併用時より低速になる。

コマンドインタフェースとデータインタフェースを併用する

・ 2 つのインタフェースを使い分ける必要がある。・ バイナリデータの解釈と演算が必要となる。・ データ転送レートの高速化が見込める。

コマンドインタフェースのみを使用した場合の例は「2-4. 設定例」、コマンドインタフェースとデータインタフェースを併用した場合の例は「2-5. コマンドインタフェースとデータインタフェースを併用する場合」をご参照ください。

重要データインタフェースはアプリケーション層のプロトコルを独自に規定しています。既存のネットワークに接続する場合、ネットワーク管理者への申請やネットワーク機器の設定やコンピュータのセキュリティ設定の変更が必要になる場合があります。

Page 10: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

2-2 (J) MG40 Series

2-2. イーサネットインタフェースへの接続

2-2-1. コマンドインタフェースへの接続

次の手順で接続を行ないます。

1 コンピュータや PLC と MG41 メインユニットをイーサネットケーブルで接続します。

2 下記接続設定を行ないます。

プロトコル telnet TCPIP アドレス 設定したIPアドレス (∗) ( 工場出荷時は 192.168.1.100)ポート番号 TCP 23 番 TCP 10023 番改行コード CR LF  

(∗) 参考

設定した IP アドレスがわからなくなった場合、MG41 メインユニット側面の通信設定スイッチの SW8 を ON にしてから再起動すると、一時的に工場出荷時の 192.168.1.100 に接続することができます。 ( 取扱説明書「9. 故障とお考えになる前に」参照 )

【telnet】3 コマンドインタフェースに接続します。 コマンドインタフェースに接続すると、MG41 メ

インユニットから下図のようなログインプロンプトが出力されます。

login:

4 ログイン名として MG41 と入力し、改行を送信します。

login: MG41 CR LF

Password: が表示されます。

Password:

5 パスワードとして MG41 と入力し、改行を送信します。

login: MG41 CR LFPassword: MG41 CR LF

コマンドインタフェースへの接続が完了します。

【TCP】3 コマンドインタフェースに接続します。 コマンドインタフェースへの接続が完了します。

Page 11: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 2-3MG40 Series

2-3. 初期設定手順設置後、必ず以下の初期設定を行なってください。初期設定は、コマンドインタフェースへの接続完了後に行ないます。(「2-2-1. コマンドインタフェースへの接続」参照 )

使用する地域の設定1 < 日本国内で使用する場合 >

CTR=1 CR LF とコマンド入力します。

……コマンドが成功すると、

OK000 CR LF と返信されます。

IP アドレスの設定2 使用するネットワークにあわせて、以下の例を参照して設定します。 < 例 > IP アドレスを 192.168.1.10 に設定する場合

NIP=192.168.1.10 CR LF とコマンド入力します。

……コマンドが成功すると

OK000 CR LF と返信されます。

以上で初期設定は完了です。

∗ 設定を初期化しない限り、使用する地域の再設定は不要です。∗ 新しい IP アドレス設定は、次回起動時から反映されます。

<コマンド返信エラーについて>コマンドの送信後、OK000 ではなく ER で始まる返信がある場合は、エラーが発生しています。(「6. エラーコード」参照 )

返信 エラー内容 確認事項

ER210 コマンド認識エラーの可能性 コマンドの形式またはアルファベットは正しいですか ?

ER214 パラメータエラーの可能性 イコール符号の後の数値は正しいですか ?

参考コマンドを送信しても返信がない場合、コマンド応答が“応答なし”に設定されている可能性があります。コマンド応答コマンド (CRP) を用いて“応答あり”に設定すると、返信されるようになります。

→ CRP コマンド

Page 12: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

2-4 (J) MG40 Series

2-4. 設定例コマンドインタフェースを用いた例として、セットアップコマンドと操作、データ取得の手順を紹介します。

2-4-1. 接続

コマンドインタフェースへの接続を行ないます。(「2-2-1. コマンドインタフェースへの接続」参照 )

2-4-2. 計測条件の設定

セットアップモードへの切替えMOD コマンドを使用して、セットアップモードを意味する 0 を設定します。

→ MOD コマンド

MOD=0 CR LFOK000 CR LF

構成情報の取得 CFG コマンドを使用して、MG41 メインユニットに接続されている MG42 ハブユニットや測定軸の構成情報を取得します。

→ CFG コマンド

CFG[∗∗∗]? CR LF

下記のような構成情報を取得することができます。

CFG[∗∗∗]=02 004 {110003 210109} CR LF (MG41-NE に MG42-4 が 1 台接続され、それぞれに 2 本ずつの測長ユニットが接続されて

います。)

コンパレータ設定 注意

コンパレータ値 (CMV コマンド ) の設定は、コンパレータモード (CMM コマンド ) の設定直後に行なってください。コンパレータモードと組合わせて設定されるため、別の設定の後に行なうと、正しく動作しません。

( 例 ) 下記の条件で設定・ コンパレータ段数 : 4 段・ コンパレータ対象 : 現在値・ コンパレータ値

段   軸 [00A] [01D]

4 段 0.002 0.010

3 段 0.001 0.005

2 段 0.000 0.002

1 段 -0.001 0.000

Page 13: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 2-5MG40 Series

1 CMM コマンドを使用して、4 段を意味する 1 と、現在値を意味する 0 を設定します。→ CMM コマンド

CMM=1 0 CR LFOK000 CR LF

2 CMV コマンドを使用して、コンパレータ値を設定します。( この例では、組番号 1 にコンパレータ値を設定します。)→ CMV コマンド

CMV[00A]0101=-0.001 CR LFOK000 CR LF

CMV[00A]0102=0.000 CR LFOK000 CR LF

CMV[00A]0103=0.001 CR LFOK000 CR LF

CMV[00A]0104=0.002 CR LFOK000 CR LF

CMV[01D]0101=0.000 CR LFOK000 CR LF

CMV[01D]0102=0.002 CR LFOK000 CR LF

CMV[01D]0103=0.005 CR LFOK000 CR LF

CMV[01D]0104=0.010 CR LFOK000 CR LF

3 CMS コマンドを使用して、使用するコンパレータ組番号を設定します。( この例では、組番号 1 にコンパレータ組番号を設定します。)→ CMS コマンド

CMS[00A]=01 CR LFOK000 CR LF

CMS[01D]=01 CR LFOK000 CR LF

Page 14: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

2-6 (J) MG40 Series

データ形式の設定

<例>データヘッダタイプを 2、区切り文字をスペースに設定データヘッドタイプ1 HDR コマンドを使用して、タイプ 2 を意味する 02 を設定します。

→ HDR コマンド

HDR=02 CR LFOK000 CR LF

データ軸区切り2 SEP コマンドを使用して、スペースを意味する 0 を設定します。

→ SEP コマンド

SEP=0 CR LFOK000 CR LF

2-4-3. 計測の開始

計測モードへの切替え計測条件の設定が終了したら、計測モードに切替えます。

1 MOD コマンドを使用して、計測モードを意味する 1 を設定します。→ MOD コマンド

MOD=1 CR LFOK000 CR LF

データの取得

<例>全軸データを出力→ R コマンド、r コマンド

1 全軸データ要求を意味する R コマンドを送信します。

R CR LF

全軸データの例

[00A]04C00=0.0050 [00B]00C00=-123.4567 [01A]00C00=-1.2900 [01D]02C00=0.0030 CR LF→データフォーマット ( アスキーデータ )

参考 データ要求コマンドは、データを再計算して出力しますので、ラッチまたはポーズの設定によりデータ更

新が固定されている軸があると、エラーになります。

Page 15: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 2-7MG40 Series

2-5. コマンドインタフェースとデータインタフェースを併用する場合「2-4. 設定例」を参考に、コマンドインタフェースの接続と必要な設定を行ないます。

2-5-1. 計測条件の設定

「セットアップモードへの切替え」、「構成情報の取得」、「コンパレータ設定」の説明は、「2-4-2. 計測条件の設定」を参照してください。

ゲートウェイアドレスの設定ご使用のネットワークにおいて、ゲートウェイアドレスの設定が必要な場合に設定します。 必要性や設定値についてはネットワーク管理者にお問い合わせください。

<例> 192.168.1.254 を設定1 NGW コマンドを使用して、ゲートウェイアドレスを設定します。

→ NGW コマンド

NGW=192.168.1.254 CR LFOK000 CR LF

データ送出プロトコルの設定データインタフェースで使用するプロトコルを設定します。

<例> TCP を設定1 NPC コマンドを使用して、TCP を意味する 0 を設定します。

→ NPC コマンド

NPC=0 CR LFOK000 CR LF

データ送出ポート番号の設定データインタフェースで使用するポート番号を設定します。事前にネットワーク管理者にお問い合わせの上、使用が許可されているポート番号をご使用ください。注意

既存ネットワークで使用されているポート番号を誤って設定すると、データが受け取れないばかりでなく、他のネットワーク機器の動作に支障をきたす恐れがありますのでご注意ください。

参考一般には 49152 番以降のポート番号を使用します。ポート番号 1 ~ 1023 : すでに一般インターネットサービスで予約済みの可能性があります。ポート番号 1024 ~ 49151 : すでに何らかのシステムで使用されている可能性があります。

<例> 49154 番を設定1 NPN コマンドを使用して、49154 番を設定します。

→ NPN コマンド

NPN=49154 CR LFOK000 CR LF

Page 16: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

2-8 (J) MG40 Series

接続ソフトウェアから TCP 接続を確立します。

1 コマンドインタフェースと接続します。(「2-2-1. コマンドインタフェースへの接続」参照 )

2 下記接続設定を行ないます。

プロトコル TCP

IP アドレス コマンドインタフェースと同じ

ポート番号 コマンドで指定したポート番号

3 MG41 メインユニットの TCP サーバに接続します。

参考プロトコルに UDP を選択した場合は、接続の必要はありません。UDP を選択した場合は、指定したポート番号で受信準備を行なってください。

2-5-2. 計測の開始

計測モードへの切替え計測条件の設定が終了したら、計測モードに切替えます。

1 MOD コマンドを使用して、計測モードを意味する 1 を設定します。→ MOD コマンド

MOD=1 CR LFOK000 CR LF

データ送出の開始データ送出制御の設定で、送信開始の設定にします。

→ NDT コマンド

1 NDT コマンドを使用して、送信開始を意味する 1 を設定します。

NDT=1 CR LFOK000 CR LF

データ出力制御コマンドを送信すると、データインタフェースからデータが連続して送られてきますので、ソフトウェアで必要な処理を行なってください。データはバイナリ形式です。詳しくは「5. データフォーマット」を参照してください。

データ送出の停止データ送出制御の設定で、送信停止の設定にします。

→ NDT コマンド

1 NDT コマンドを使用して、送信停止を意味する 0 を設定します。

NDT=0 CR LFOK000 CR LF

Page 17: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 3-1MG40 Series

3. CC-Link インタフェース

3-1. CC-Link インタフェース概要MG41-NC の CC-Link インタフェースは、CC-Link Ver.1.1 準拠のリモートデバイス局として動作し、サイクリック伝送を用いて CC-Link マスター局とのデータ通信を行ないます。

プロトコル CC-Link Ver.1.1 準拠

局種別 リモートデバイス局

占有局数 4 局

局番号 1 ~ 61 DIP スイッチで設定

伝送速度 156 kbps、625 kbps、2.5 Mbps、5 Mbps、10 Mbps (DIP スイッチで設定 )

サイクリック伝送データ リモート入出力 (RX / RY) リモートレジスタ (RWr / RWw)

CC-Link インタフェースでは下記 2 種類のデータ入出力を使用します。

リモート入出力 RX、RY で表されるビット入出力で、入出力独立でそれぞれ 128 ビットの入出力を持ち、通信ハンドシェイクとステータス通知に使用します。

リモートレジスタ RWr、RWw で表されるワード入出力で、入出力独立でそれぞれ 16 個、合計 32 バイトのレジスタを持ち、コマンド・データ通信に使用します。

Page 18: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

3-2 (J) MG40 Series

3-2. CC-Link アドレスマップ局番号設定を 1 とした場合のアドレスマップを示します。

●リモート入出力

局MG41-NC→ PLC PLC→MG41-NC

リモート入力 名称 リモート出力 名称

1 RX00 IRX RY00 IRY

RX01 Reserved RY01 Reserved

RX02 RY02

| | |

4 RX7B RDY |

| Reserved |

RX7F RY7F

IRX : インターロック (MG41-NC → PLC)IRY : インターロック (PLC → MG41-NC)RDY : リモート READY (MG41-NC → PLC)

●リモートレジスタ

局MG41-NC→ PLC PLC→MG41-NC

リモートレジスタ 名称 リモートレジスタ 名称

1 RWr00 受信バッファ RWw00 送信バッファ

| | |

4 RWr0F RWw0F

受信バッファ : MG41-NC からの返信データが格納されます。( 合計 32 バイト )送信バッファ : MG41-NC への送信データを格納します。( 合計 32 バイト )

コマンド送信、実行結果返信時はアスキーコード 32 文字分として使用、データ転送時はバイナリデータフォーマット仕様準拠のバイナリデータとして使用します。

Page 19: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 3-3MG40 Series

3-3. CC-Link コマンド送信手順CC-Link インタフェースでコマンドを送信し、応答を取得する手段です。

000 11

000 11

コマンドセット完了 コマンドセット完了 応答受領応答受領

コマンド実行完了

コマンド 次のコマンド

次のコマンド応答コマンド応答

コマンド実行完了応答受領確認 応答受領確認

IRY(PLC→MG41-NC)

IRX(MG41-NC→PLC)

MG41-NC受信バッファ(PLC→MG41-NC)

PLC受信バッファ(MG41-NC→PLC)

PLC 側から見ると下記のようなシーケンスとなります。

1 送信バッファにコマンドを書き込みます

2 IRY に 1 をセットします。( コマンド実行指示 )

3 IRX が 1 になるのを待ちます。( コマンド実行完了待ち )

4 IRX が 1 になったらコマンド応答を取得します。

5 応答を取得したら IRY に 0 をセットします。( 応答受領 )

6 IRX が 0 になるのを待ちます。( 応答受領確認待ち )

MG41-NC メインユニット側から見ると下記のようなシーケンスとなります。

1 IRY が 1 になり、コマンド実行が指示されます。

2 バッファからコマンドを読み出し、コマンドを実行します。

3 バッファに応答を書き込み、IRX に 1 をセットします。( コマンド実行完了 )

4 IRY が 0 になるのを待ちます。( 応答受領待ち )

5 IRX に 0 をセットします。( 応答受領確認 )

Page 20: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

3-4 (J) MG40 Series

Page 21: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-1MG40 Series

4. コマンドリファレンス

4-1. コマンド一覧操作コマンド一覧

機能 コマンド セットアップモード

計測モード

イーサネット CC-Link ページ

動作モード 設定 MOD = < 動作モード > ○ ○ ○ ○ 4-4取得 MOD? ○ ○ ○ ○ 4-4

リセット 設定 SVZ 指定軸 × ○ ○ ○ 4-5プリセット 設定 PSS 指定軸 = < 値 > × ○ ○ ○ 4-6

取得 PSS 指定軸 ? × ○ ○ ○ 4-6呼出し PSR 指定軸 × ○ ○ ○ 4-6

基準点 設定 DPT 指定軸 = < 値 > × ○ ○ ○ 4-7取得 DPT 指定軸 ? × ○ ○ ○ 4-7基準点オフセット記憶

DPS 指定軸 × ○ ○ ○ 4-7

基準点再現 DPR 指定軸 × ○ ○ ○ 4-7原点通過待ち解除

DPC 指定軸 × ○ ○ ○ 4-7

原点情報 取得 STR 指定軸 ? × ○ ○ ○ 4-8マスター マスター値

設定MCV 指定軸 = < 値 > × ○ ○ ○ 4-9

マスター値取得

MCV 指定軸 ? × ○ ○ ○ 4-9

マスター再現 MCR 指定軸 × ○ ○ ○ 4-9スタート 設定 STA 指定軸 × ○ ○ ○ 4-10ポーズ ポーズ設定 PAU 指定軸 = < 設定値 > × ○ ○ ○ 4-11

ポーズ状態取得

PAU 指定軸 ? × ○ ○ ○ 4-11

ラッチ ラッチ設定 LCH 指定軸 = < 設定値 > × ○ ○ ○ 4-12ラッチ状態取得

LCH 指定軸 ? × ○ ○ ○ 4-12

出力データ 出力データ設定

OPD 指定軸 = < 値 > ○ ○ ○ ○ 4-13

出力データ取得

OPD 指定軸 ? ○ ○ ○ ○ 4-13

コンパレータ組番号

設定 CMS 指定軸 = < 組番号 > ○ ○ ○ ○ 4-14取得 CMS 指定軸 ? ○ ○ ○ ○ 4-14

データ要求 全軸データ要求

R × ○ ○ × 4-15

指定軸データ要求

r 指定軸 × ○ ○ ○ 4-15

メモリデータ出力

現在値 MRC 指定軸 ? × ○ ○ ○ 4-16最大値 MRA 指定軸 ? × ○ ○ ○ 4-16最小値 MRI 指定軸 ? × ○ ○ ○ 4-16P-P 値 MRP 指定軸 ? × ○ ○ ○ 4-16ABS 値 MRB 指定軸 ? × ○ ○ ○ 4-16

データ送出制御

設定 NDT = < 値 > < 待機時間 > × ○ ○ × 4-17取得 NDT? ○ ○ ○ × 4-17

Page 22: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-2 (J) MG40 Series

セットアップコマンド一覧

機能 コマンド セットアップモード

計測モード

イーサネット CC-Link ページ

出力分解能 設定 OPR 指定軸 = < 極性 >< 分解能 > ○ × ○ ○ 4-18

取得 OPR 指定軸 ? ○ ○ ○ ○ 4-18入力分解能 取得 IPR 指定軸 ? ○ ○ ○ ○ 4-19マスター合わせ機能

設定 MCM = < 値 > ○ × ○ ○ 4-20取得 MCM? ○ ○ ○ ○ 4-20

使用地域 設定 CTR = < 値 > ○ × ○ ○ 4-21取得 CTR? ○ ○ ○ ○ 4-21

コンパレータモード

設定 CMM 指定軸 = < モード > < 対象値 > ○ × ○ ○ 4-22

取得 CMM 指定軸 ? ○ ○ ○ ○ 4-22コンパレータ値

設定 CMV 指定軸 < 組番号 >< 段番号 > = < 値 > ○ × ○ ○ 4-23

取得 CMV 指定軸 < 組番号 >< 段番号 >? ○ ○ ○ ○ 4-23

データヘッダ データヘッダ設定

HDR = < ヘッダ > ○ × ○ × 4-24

データヘッダ取得

HDR? ○ ○ ○ × 4-24

データ軸区切り

設定 SEP = < 値 > ○ × ○ × 4-25取得 SEP? ○ ○ ○ × 4-25

軸演算機能 設定 ADD = < 符 1> 主軸 < 符 2> 参照軸 ○ × ○ ○ 4-26

取得 ADD 主軸 ? ○ ○ ○ ○ 4-26構成情報 取得 CFG 対象機器 ? ○ ○ ○ ○ (∗) 4-27設定初期化 設定 INI 指定軸 = < 初期化

レベル > ○ × ○ ○ 4-28

設定値保存 設定値保存 SAV ○ × ○ ○ 4-29バージョン情報

取得 VER 対象機器 ? ○ ○ ○ ○ 4-30

エラー情報 取得 ERR? ○ ○ ○ ○ 4-31内蔵時計 設定 CLK = < 値 > ○ × ○ ○ 4-32

取得 CLK? ○ ○ ○ ○ 4-32コマンド応答 設定 CRP = < 値 > ○ × ○ ○ 4-33

取得 CRP? ○ ○ ○ ○ 4-33イーサネット局番号

取得 NID? ○ ○ ○ × 4-34

IP アドレス 設定 NIP = <IP アドレス > ○ × ○ × 4-35取得 NIP? ○ ○ ○ × 4-35

MAC アドレス 取得 NMC? ○ ○ ○ × 4-36ゲートウェイアドレス

設定 NGW = < アドレス > ○ × ○ × 4-37取得 NGW? ○ ○ ○ × 4-37

サブネットマスク

設定 NSM = < サブネットマスク > ○ × ○ × 4-38

取得 NSM? ○ ○ ○ × 4-38データ送出プロトコル

設定 NPC = < 値 > ○ × ○ × 4-39取得 NPC? ○ ○ ○ × 4-39

デ ー タ 送 出ポート番号

設定 NPN = < 値 > ○ × ○ × 4-40取得 NPN? ○ ○ ○ × 4-40

測長ユニット製品情報

取得 AXP 指定軸 ? ○ × ○ ○ 4-41

測長ユニットメンテナンス情報

取得 AXM 指定軸 ?○ × ○ ○ 4-42

測長ユニットユーザー情報

設定 AXU 指定軸 = < ユーザーID> ○ × ○ ○ 4-43

取得 AXU 指定軸 ? ○ × ○ ○ 4-43

(∗) : 対象機器を指定

Page 23: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-3MG40 Series

4-2. コマンド表の見方以降の章で、コマンドの詳細説明を行ないます。コマンド表の見方は次のとおりです。

設定 セットアップモード 計測モード イーサネット CC-Link

現在値に数値を設定する。

コマンド形式 PSS 指定軸 =<値 > < 値 > 出力分解能相当

返信形式 実行結果

対象

使用例 送信 : PSS[01B]=123.2315 (MG42ハブユニットID01の B軸を123.2315に設定)

返信 : OK000 (正常に完了した)

互換コマンド 指定軸 P=<値 >

指定軸、MG42ハブユニット、全軸設定値保存 保存する

実行可能なモードを示します。

送信するコマンドを示します。

実行可能なインタフェースを示します。

送信したコマンドに対する返信を示します。

コマンドの対象範囲を示します。

設定値が保存可能かどうかを示します。設定値の保存にはSAVコマンドを使用します。

従来の弊社製品との互換性を重視したコマンドです。互換コマンドが存在しない場合もあります。

指定軸について

指定軸は下記を参考に入力します。[ ] も入力してください。

[ □□□ ] ユニット指定 軸指定

∗: 全て対象

[∗∗∗] = 全軸 [00∗] = MG41 メインユニットの全軸 [01∗] = MG42 ハブユニット #01 の全軸 [02∗] = MG42 ハブユニット #02 の全軸 ・ ・ ・ ・ ・ ・ [31∗] = MG42 ハブユニット #31 の全軸

[00A] = MG41 メインユニットの A 軸 [00B] = MG41 メインユニットの B 軸 [00C] = MG41 メインユニットの C 軸 [00D] = MG41 メインユニットの D 軸 

[01A] = MG42 ハブユニット #01 の A 軸 [01B] = MG42 ハブユニット #01 の B 軸 [01C] = MG42 ハブユニット #01 の C 軸 [01D] = MG42 ハブユニット #01 の D 軸 ・ ・ ・ ・ ・ ・ [31A] = MG42 ハブユニット #31 の A 軸 [31B] = MG42 ハブユニット #31 の B 軸 [31C] = MG42 ハブユニット #31 の C 軸 [31D] = MG42 ハブユニット #31 の D 軸

Page 24: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-4 (J) MG40 Series

4-3. 操作コマンド

●動作モードセットアップモード、計測モードの切替えと現在の状態の取得を行ないます。

設定 セットアップモード 計測モード イーサネット CC-Link

セットアップモード、計測モードの切替えをする。

コマンド形式 MOD=<動作モード>< 動作モード > 0 : セットアップモード (出荷時設定)

1 : 計測モード

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存しない

使用例 送信 : MOD=1 ( 計測モードに設定する )

返信 : OK000 ( 正常に完了した )

互換コマンド なし

取得 セットアップモード 計測モード イーサネット CC-Link

現在の動作モードを取得する。

コマンド形式 MOD?返信形式 MOD=< 動作モード >

< 動作モード > 0 : セットアップモード1 : 計測モード

対象 MG41 メインユニット

使用例 送信 : MOD? ( 現在の動作モード取得 )

返信 : MOD=1 ( 現在のモードは計測モード )

互換コマンド なし

Page 25: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-5MG40 Series

●リセット計測値をゼロにします。スピードエラー状態のときはエラーを解除します。原点通過待ち状態のときは原点通過待ち状態を解除します。ただし、マスター合わせの原点通過待ち状態のときは、解除できずにモードエラーになります。

設定 計測モード イーサネット CC-Link

リセットする。

コマンド形式 SVZ 指定軸返信形式 実行結果

対象 指定軸、MG42 ハブユニット、全軸

使用例 送信 : SVZ[00A] (MG41 メインユニットの A 軸をリセット )

返信 : OK000 ( 正常に完了した )

送信 : SVZ[03∗] (MG42 ハブユニット ID03 の全軸をリセット )

返信 : OK000 ( 正常に完了した )

送信 : SVZ[∗∗∗] ( システム全軸リセット )

返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 RES

Page 26: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-6 (J) MG40 Series

●プリセット

測定値に数値を設定します。注意

・ 原点通過待ち状態のときは、モードエラーになり、設定 / 呼出しはできません。・ エラー状態の軸に対しては、設定 / 呼出しはできません。

設定 計測モード イーサネット CC-Link

現在値に数値を設定する。

コマンド形式 PSS 指定軸 =<値 >< 値 > 出力分解能相当 (出荷時設定: ゼロ )

返信形式 実行結果

対象 指定軸、MG42 ハブユニット、全軸

設定値保存 保存する

使用例 送信 : PSS[01B]=123.2315 (MG42 ハブユニット ID01 の B 軸を 123.2315 に設定 )

返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 P=< 値 >

取得 計測モード イーサネット CC-Link

プリセット値を取得する。

コマンド形式 PSS 指定軸 ?返信形式 PSS 指定軸 =< 値 >

< 値 > 出力分解能相当

対象 指定軸

使用例 送信 : PSS[00A]? (MG41 メインユニットの A 軸のプリセット値取得 )

返信 : PSS[00A]=100.0000 ( プリセット値は 100.0000)

互換コマンド なし

呼出し 計測モード イーサネット CC-Link

プリセット値を呼出す。

コマンド形式 PSR 指定軸返信形式 実行結果

対象 指定軸、MG42 ハブユニット、全軸

使用例 送信 : PSR[∗∗∗] ( 全ての軸でプリセット値呼び出し )

返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 RCL

Page 27: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-7MG40 Series

●基準点

基準点を設定します。マスター合わせ機能 On の場合は、使用できません。軸演算機能が設定されている軸には使用できません。

設定 計測モード イーサネット CC-Link基準点位置を設定する。コマンド形式 DPT 指定軸 =<値 >

< 値 > 出力分解能相当 (出荷時設定: ゼロ )返信形式 実行結果対象 指定軸設定値保存 保存する使用例 送信 : DPT[31D]=10.12345 (MG42 ハブユニット ID31 の D 軸の基準点を 10.12345 に設定 ) 返信 : OK000 ( 正常に完了した )互換コマンド 指定軸 M=< 値 >

取得 計測モード イーサネット CC-Link基準点位置設定した値を取得する。コマンド形式 DPT 指定軸 ?返信形式 DPT 指定軸 =< 値 >

< 値 > 出力分解能相当対象 指定軸使用例 送信 : DPT[00D]? (MG41 メインユニットの D 軸の基準点取得 ) 返信 : DPT[00D]=11.0000 (MG41 メインユニットの D 軸基準点は 11.0000)互換コマンド なし

基準点オフセット記憶 計測モード イーサネット CC-Link基準点オフセット値を記憶する。※ コマンド送信後、原点通過待ち状態になりますので、原点を通過させてください。原点通過後に基準点

オフセット値が記憶されます。コマンド形式 DPS 指定軸返信形式 実行結果対象 指定軸使用例 送信 : DPS[03B] (MG42 ハブユニット ID03 の B 軸で基準点オフセット記憶 ) 返信 : OK000 ( 正常に完了した )互換コマンド なし

基準点再現 計測モード イーサネット CC-Link基準点位置を再現する。※ コマンド送信後、原点通過待ち状態になりますので、原点を通過させてください。原点通過後に基準点

位置が再現されます。コマンド形式 DPR 指定軸返信形式 実行結果対象 指定軸使用例 送信 : DPR[03B] (MG42 ハブユニット ID03 の B 軸で基準点再現 ) 返信 : OK000 ( 正常に完了した )互換コマンド なし

原点通過待ち解除 計測モード イーサネット CC-Link原点通過待ちの状態を解除する。コマンド形式 DPC 指定軸返信形式 実行結果対象 指定軸使用例 送信 : DPC[03B] (MG42 ハブユニット ID03 の B 軸で原点通過待ち解除 ) 返信 : OK000 ( 正常に完了した )互換コマンド なし

Page 28: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-8 (J) MG40 Series

●原点情報原点検出の状態を取得します。

取得 計測モード イーサネット CC-Link

原点検出の状態を取得する。

コマンド形式 STR 指定軸?返信形式 STR 指定軸 =< 値 >

< 値 > 0 : 原点未検出1 : 原点通過待ち2 : 原点検出済み

対象 指定軸

使用例 送信:STR[00A]? (MG41 メインユニットの A 軸の原点状態の取得 )

送信:STR[00A]=1 ( 原点通過待ち状態 )

互換コマンド なし

Page 29: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-9MG40 Series

●マスターマスターあわせの設定・操作を行ないます。マスター合わせ機能 On の場合に使用できます。

→ MCM コマンド

マスター値設定 計測モード イーサネット CC-Link

マスター値を設定する。

コマンド形式 MCV 指定軸 =<値 >< 値 > 出力分解能相当 (出荷時設定: ゼロ )

返信形式 実行結果

対象 指定軸

設定値保存 保存する

使用例 送信 : MCV[01B]=123.2315 (MG42 ハブユニット ID01 の B 軸マスター値を 123.2315 に設定 )

返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 MS=< 値 >

マスター値取得 計測モード イーサネット CC-Link

マスター値を取得する。

コマンド形式 MCV 指定軸 ?返信形式 MCV 指定軸 =< 値 >

< 値 > 出力分解能相当

対象 指定軸

使用例 送信 : MCV[00A]? (MG41 メインユニットの A 軸のマスター値取得 )

返信 : MCV[00A]=100.0000 ( マスター値は 100.0000)

互換コマンド なし

マスター値再現 計測モード イーサネット CC-Link

マスター値を再現する。

※ コマンド送信後、原点通過待ち状態になりますので、原点を通過させてください。原点通過後にマスター値が再現されます。

コマンド形式 MCR 指定軸返信形式 実行結果

対象 指定軸

使用例 送信 : MCR[01B] (MG42 ハブユニット ID01 の B 軸マスター値を再現 )

返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 MR

Page 30: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-10 (J) MG40 Series

●スタートピーク演算をリスタートします。

設定 計測モード イーサネット CC-Link

ピークの更新を始める。

コマンド形式 STA 指定軸返信形式 実行結果

対象 単軸、MG42 ハブユニット、全軸

使用例 送信 : STA[∗∗∗] ( 全軸ピーク演算リスタート )

返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 START

Page 31: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-11MG40 Series

●ポーズポーズに関する設定・取得を行ないます。ポーズ中のラッチやラッチ中のポーズはできません。ポーズ中のデータ出力は、メモリデータ出力コマンドを使用してください。データ要求コマンドは使用できません。

ポーズ設定 計測モード イーサネット CC-Link

ポーズ状態を設定する。

コマンド形式 PAU 指定軸 =<設定値 >< 設定値 > 0 : Off (出荷時設定)

1 : On

返信形式 実行結果対象 単軸、MG42 ハブユニット、全軸設定値保存 保存しない

使用例 送信 : PAU[00∗]=1 (MG41 メインユニットの全軸でポーズ設定 ) 返信 : OK000 ( 正常に完了した )互換コマンド なし

ポーズ状態取得 計測モード イーサネット CC-Link

現在のポーズ状態を取得する。

コマンド形式 PAU 指定軸 ?返信形式 PAU 指定軸 =< 設定値 >

< 設定値 > 0 : Off 1 : On

対象 単軸

使用例 送信 : PAU[00A]? (MG41 メインユニットの A 軸のポーズ状態取得 ) 返信 : PAU[00A]=1 ( ポーズ On 状態 )互換コマンド なし

ポーズOn ( 互換コマンドのみ ) 計測モード イーサネット CC-Link

ポーズ状態にする。

コマンド形式 なし返信形式 実行結果対象 単軸、MG42 ハブユニット、全軸

使用例 送信 : [31∗]PAUON (MG42 ハブユニット ID31 の全軸でポーズ On) 返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 PAUON

ポーズOff ( 互換コマンドのみ ) 計測モード イーサネット CC-Link

ポーズ状態を解除する。

コマンド形式 なし返信形式 実行結果対象 単軸、MG42 ハブユニット、全軸

使用例 送信 : [01∗]PAUOFF (MG42 ハブユニット ID01 の全軸でポーズ Off ) 返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 PAUOFF

Page 32: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-12 (J) MG40 Series

●ラッチ表示ラッチに関する設定・取得を行ないます。ポーズ中のラッチやラッチ中のポーズはできません。ラッチ中のデータ出力は、メモリデータ出力コマンドを使用してください。データ要求コマンドは使用できません。

ラッチ設定 計測モード イーサネット CC-Link

ラッチ状態を設定する。

コマンド形式 LCH 指定軸 =<設定値 >< 設定値 > 0 : Off (出荷時設定)

1 : On

返信形式 実行結果対象 単軸、MG42 ハブユニット、全軸設定値保存 保存しない

使用例 送信 : LCH[00∗]=1 (MG41 メインユニットの全軸でラッチ設定 ) 返信 : OK000 ( 正常に完了した )互換コマンド なし

ラッチ状態取得 計測モード イーサネット CC-Link

現在のラッチ状態を取得する。

コマンド形式 LCH 指定軸 ?返信形式 LCH 指定軸 =< 設定値 >

< 設定値 > 0 : Off 1 : On

対象 単軸

使用例 送信 : LCH[00A]? (MG41 メインユニットの A 軸のラッチ状態取得 ) 返信 : LCH[00A]=1 ( ラッチ On 状態 )互換コマンド なし

ラッチOn ( 互換コマンドのみ ) 計測モード イーサネット CC-Link

ラッチ状態にする。

コマンド形式 なし返信形式 実行結果対象 単軸、MG42 ハブユニット、全軸

使用例 送信 : [31∗]LCHON (MG42 ハブユニット ID31 の全軸でラッチ On) 返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 LCHON

ラッチOff ( 互換コマンドのみ ) 計測モード イーサネット CC-Link

ラッチ状態を解除する。

コマンド形式 なし返信形式 実行結果対象 単軸、MG42 ハブユニット、全軸

使用例 送信 : [01∗]LCHOFF (MG42 ハブユニット ID01 の全軸でラッチ Off ) 返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 LCHOFF

Page 33: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-13MG40 Series

●出力データデータ要求コマンドで取得する出力データの種類を設定・取得します。

出力データ設定 セットアップモード 計測モード イーサネット CC-Link

データ要求コマンドで出力するデータの種類を設定する。

コマンド形式 OPD 指定軸 =<値 >< 値 > 0 : 現在値 (出荷時設定)

1 : 最大値2 : 最小値3 : P-P 値4 : ABS 値

返信形式 実行結果

対象 単軸、MG42 ハブユニット、全軸

設定値保存 保存する

使用例 送信 : OPD[00A]=3 (MG41 メインユニットの A 軸で P-P 値を出力する )

返信 : OK000 ( 正常に完了した )

互換コマンド なし

出力データ取得 セットアップモード 計測モード イーサネット CC-Link

データ要求コマンドで出力するデータの種類を取得する。

コマンド形式 OPD 指定軸 ?返信形式 OPD 指定軸 =< 値 >

< 値 > 0 : 現在値1 : 最大値2 : 最小値3 : P-P 値4 : ABS 値

対象 単軸

使用例 送信 : OPD[00B]? (MG41 メインユニットの B 軸の出力データ取得 )

返信 : OPD=1 ( 出力データは最大値 )

互換コマンド なし

Page 34: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-14 (J) MG40 Series

●コンパレータ組番号使用するコンパレータ組番号を選択・取得します。

設定 セットアップモード 計測モード イーサネット CC-Link

使用するコンパレータ組番号を設定する。

コマンド形式 CMS 指定軸 =<組番号 >< 組番号 > 01 : コンパレータ組番号 01 ( 出荷時設定 )

02 : コンパレータ組番号 02・・・16 : コンパレータ組番号 16

返信形式 実行結果

対象 指定軸、MG42 ハブユニット、全軸

設定値保存 保存する

使用例 送信 : CMS[01B]=05 (MG42 ハブユニット ID01 の B 軸のコンパレータ組番号を 5 番に設定 )

返信 : OK000 ( 正常に完了した )

互換コマンド 指定軸 SCN=< 組番号 >

取得 セットアップモード 計測モード イーサネット CC-Link

設定されているコンパレータ組番号を取得する。

コマンド形式 CMS 指定軸 ?返信形式 CMS 指定軸 =< 組番号 >

< 組番号 > 01 : コンパレータ組番号 0102 : コンパレータ組番号 02・・・16 : コンパレータ組番号 16

対象 指定軸

使用例 送信 : CMS[00A]? (MG41 メインユニットの A 軸のコンパレータ組番号を取得 )

返信 : CMS[00A]=16 (16 番 )

互換コマンド なし

Page 35: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-15MG40 Series

●データ要求データを再計算して出力します。ラッチ / ポーズ中はデータ要求コマンドは使用できませんので、メモリデータ出力コマンドを使用してください。

全軸データ要求 計測モード イーサネット

データを再計算して、全軸データを出力する。

コマンド形式 R 返信形式 データ※

対象 全軸

使用例 送信 : R 返信 : [00A]02=-123.4567 ・・( 略 )

互換コマンド R

指定軸データ要求 計測モード イーサネット CC-Link

データを再計算して、指定する軸のデータを出力する。

コマンド形式 r 指定軸返信形式 データ※

対象 指定軸、MG42 ハブユニット

使用例 送信 : r[00B] 返信 : [00B]=3.4567

互換コマンド 指定軸 r

※詳細は「5. データフォーマット」を参照してください。

Page 36: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-16 (J) MG40 Series

●メモリデータ出力メモリデータを出力します。再計算を行なわずにメモリ上のデータを出力します。

現在値 計測モード イーサネット CC-Link

現在値のメモリデータを出力する。コマンド形式 MRC 指定軸 ?返信形式 データ※対象 指定軸、MG42 ハブユニット、全軸使用例 送信 : MRC[00∗]? (MG41 メインユニットの全軸の現在値メモリデータ取得 )互換コマンド 指定軸 MN

最大値 計測モード イーサネット CC-Link

最大値のメモリデータを出力する。コマンド形式 MRA 指定軸 ?返信形式 データ※対象 指定軸、MG42 ハブユニット、全軸使用例 送信 : MRA[00∗]? (MG41 メインユニットの全軸の最大値メモリデータ取得 )互換コマンド 指定軸 MA

最小値 計測モード イーサネット CC-Link

最小値のメモリデータを出力する。コマンド形式 MRI 指定軸 ?返信形式 データ※対象 指定軸、MG42 ハブユニット、全軸使用例 送信 : MRI[00∗]? (MG41 メインユニットの全軸の最小値メモリデータ取得 )互換コマンド 指定軸 MI

P-P 値 計測モード イーサネット CC-Link

P-P 値のメモリデータを出力する。コマンド形式 MRP 指定軸 ?返信形式 データ※対象 指定軸、MG42 ハブユニット、全軸使用例 送信 : MRP[00∗]? (MG41 メインユニットの全軸の P-P 値メモリデータ取得 )互換コマンド 指定軸 MP

ABS値 計測モード イーサネット CC-Link

ABS値のメモリデータを出力する。コマンド形式 MRB 指定軸 ?返信形式 データ※対象 指定軸、MG42 ハブユニット、全軸使用例 送信 : MRB[00∗]? (MG41 メインユニットの全軸の ABS 値メモリデータ取得 )互換コマンド なし

※詳細は「5. データフォーマット」を参照してください。

Page 37: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-17MG40 Series

●データ送出制御データ送出の開始・停止の設定および現在の状態の取得を行ないます。

設定 計測モード イーサネット

データ送出の開始 /停止を設定する。

コマンド形式 NDT=<値 > < 待機時間 >< 値 > 0 : 送信停止 ( 出荷時設定 )

1 : 送信開始<待機時間> (ミリ秒) 10~1000 (出荷時設定: 10ミリ秒)

待機時間 : データ送信のインタバル時間です。 指定省略時 10 ミリ秒

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存しない

使用例 送信 : NDT=1 100 返信 : OK000

送信 : NDT=0 100 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット

データ送出の状態を取得する。

コマンド形式 NDT?

返信形式 NDT=< 値 > < 待機時間 >

< 値 > 0 : 送信停止中1 : 送信中

<待機時間> (ミリ秒) 10 ~ 1000

対象 MG41 メインユニット

使用例 送信 : NDT? 返信 : NDT=0 100

互換コマンド なし

Page 38: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-18 (J) MG40 Series

4-4. セットアップコマンド

●出力分解能出力分解能の設定・取得を行ないます。入力分解能より小さな値は設定できません。出力分解能を設定すると、プリセット / 基準点 / マスター値 / コンパレータ値 / コンパレータ組番号 / ポーズ状態 / ラッチ状態はクリアされます。

設定 セットアップモード イーサネット CC-Link

出力分解能を設定する。

コマンド形式 OPR 指定軸 =<極性 ><分解能 >< 極性 > + : プラス

- : マイナス< 分解能 > (入力分解能≦出力分解能)

1 : 0.1 μ m

( 出荷時設定 : 入力分解能と同じ )

2 : 0.5 μ m3 : 1 μ m4 : 5 μ m5 : 10 μ m

返信形式 実行結果

対象 指定軸

設定値保存 保存する

使用例 送信 : OPR[00A]=+3 返信 : OK000

互換コマンド 指定軸 SDR=< 極性 >< 分解能 >

取得 セットアップモード 計測モード イーサネット CC-Link

出力分解能を取得する。

コマンド形式 OPR 指定軸 ?返信形式 OPR 指定軸 =< 極性 >< 分解能 >

< 極性 > + : プラス- : マイナス

< 分解能 > 1 : 0.1 μ m2 : 0.5 μ m3 : 1 μ m4 : 5 μ m5 : 10 μ m

対象 指定軸

使用例 送信 : OPR[00A]? 返信 : OPR[00A]=+3

互換コマンド 指定軸 SDR?

Page 39: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-19MG40 Series

●入力分解能入力分解能の取得を行ないます。

取得 セットアップモード 計測モード イーサネット CC-Link

入力分解能設定を取得する。

コマンド形式 IPR 指定軸 ?返信形式 IPR 指定軸 =< 分解能 >

< 分解能 > 1 : 0.1 μ m2 : 0.5 μ m

対象 指定軸

使用例 送信 : IPR[00A]? 返信 : IPR[00A]=1

互換コマンド なし

Page 40: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-20 (J) MG40 Series

●マスター合わせ機能

マスター合わせ機能を使用するかどうかを設定・取得します。設定値は次回起動時に反映されます。マスター合わせ機能を使用する場合、基準点機能と軸演算機能は使用できません。

設定 セットアップモード イーサネット CC-Link

マスター合わせ機能のOn/Off を設定する。

コマンド形式 MCM=<値 >< 値 > 0 : Off (マスター合わせを使用しない) (出荷時設定)

1 : On ( マスター合わせを使用する )

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存する

使用例 送信 : MCM=1 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット CC-Link

現在のマスター合わせ機能の状態を取得する。

コマンド形式 MCM?返信形式 MCM=< 値 >

< 値 > 0 : Off ( マスター合わせを使用しない )1 : On ( マスター合わせを使用する )

対象 MG41 メインユニット

使用例 送信 : MCM? 返信 : MCM=0

互換コマンド なし

Page 41: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-21MG40 Series

●使用地域MG40 シリーズを使用する地域を設定・取得します。未設定の場合、セットアップモードから計測モードに移行することができません。使用地域を設定すると、ネットワークの設定と使用地域設定を除く全ての設定値が工場出荷時状態に初期化されます。

設定 セットアップモード イーサネット CC-Link

使用地域を設定する。

コマンド形式 CTR=<値 >< 値 > 0 : 未設定 ( 出荷時設定 )

1 : JPN (日本で使用する場合、必ずJPNに設定)2 : STD 13 : STD 2

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存する

使用例 送信 : CTR=1 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット CC-Link

使用地域設定を取得する。

コマンド形式 CTR?返信形式 CTR=< 値 >

< 値 > 0 : 未設定1 : JPN2 : STD 13 : STD 2

対象 MG41 メインユニット

使用例 送信 : CTR? 返信 : CTR=2

互換コマンド なし

Page 42: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-22 (J) MG40 Series

●コンパレータモードコンパレータの段数と組数を設定・取得します。モードを変更すると、対象軸のコンパレータ値がクリアされ未設定の状態になります。注意

コンパレータ値 (CMV コマンド ) の設定は、コンパレータモード (CMM コマンド ) の設定直後に行なってください。コンパレータモードと組合わせて設定されるため、別の設定の後に行なうと、正しく動作しません。

設定 セットアップモード イーサネット CC-Link

コンパレータの段数、組数、対象を設定する。

コマンド形式 CMM 指定軸 =<モード > < 対象値 >< モード > 0 : 2段 (16組) (出荷時設定)

1 : 4 段 (8 組 )2 : 8 段 (4 組 )3 : 16 段 (2 組 )

< 対象値 > 0 : 現在値 ( 出荷時設定 )1 : 最大値2 : 最小値3 : P-P 値

返信形式 実行結果

対象 指定軸、MG42 ハブユニット、全軸

設定値保存 保存する

使用例 送信 : CMM[00A]=1 0 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット CC-Link

コンパレータモード設定を取得する。

コマンド形式 CMM 指定軸 ?返信形式 CMM 指定軸 =< モード > < 対象値 >

< モード > 0 : 2 段 (16 組 )1 : 4 段 (8 組 )2 : 8 段 (4 組 )3 : 16 段 (2 組 )

< 対象値 > 0 : 現在値1 : 最大値2 : 最小値3 : P-P 値

対象 指定軸

使用例 送信 : CMM[00A]?

返信 : CMM[00A]=3 1

互換コマンド なし

Page 43: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-23MG40 Series

●コンパレータ値コンパレータ値を設定・取得します。コンパレータモードによって設定可能範囲が異なります。注意

コンパレータ値 (CMV コマンド ) の設定は、コンパレータモード (CMM コマンド ) の設定直後に行なってください。コンパレータモードと組合わせて設定されるため、別の設定の後に行なうと、正しく動作しません。

コンパレータ値設定時の注意・ コンパレータ値は、値の小さい順に 1 段目から設定してください。 (1 段目設定値 < 2 段目設定値 < 3 段目設定値 < ・・・ < 16 段目設定値)・ 設定するコンパレータ値が、前段の設定値より小さくなる設定はできません。 (例 : 1 段目に 10 を設定した場合、2 段目に 5 を設定するとエラーになります。)・ 設定変更時、設定した値が後段の設定値より大きい場合は、後段の設定値はすべて設定なし

になります。 (例 : 1 段目に 10、2 段目に 20、3 段目に 30、4 段目に 40 が設定されている場合に、2 段目

の設定値を 40 に変えると、3 段目と 4 段目の設定値は設定なしになります。)

設定 セットアップモード イーサネット CC-Link

コンパレータ値を設定する。

コマンド形式 CMV 指定軸 <組番号 ><段番号 >=<値 >< 組番号 > 01 : 1 組~ 16 : 16 組

出荷時設定はなし< 段番号 > 01 : 1 段~ 16 : 16 段< 値 > 出力分解能桁相当 (未入力で設定クリア)

返信形式 実行結果対象 指定軸、MG42 ハブユニット、全軸設定値保存 保存する使用例 送信 : CMV[00A]0101=12.3335 (MG41 メインユニットの A 軸の組番号 01、段番号 01 に 12.3335 を設定 ) 返信 : OK000 送信 : CMV[00B]0101= (MG41 メインユニットの B 軸の組番号 01、段番号 01 のコンパレータ設定値 をクリア ) 返信 : OK000互換コマンド なし

取得 セットアップモード 計測モード イーサネット CC-Link

コンパレータ値を取得する。

コマンド形式 CMV 指定軸 <組番号 ><段番号 >?返信形式 CMV 指定軸 < 組番号 >< 段番号 >=< 値 >

< 組番号 > 01 : 1 組~ 16 : 16 組< 段番号 > 01 : 1 段~ 16 : 16 段< 値 > 出力分解能桁相当 ( 設定がない場合は出力なし )

対象 指定軸使用例 送信 : CMV[00A]0101? 返信 : CMV[00A]0101=12.3335 ( コンパレータ値は 12.3335) 送信 : CMV[00B]0101? 返信 : CMV[00B]0101= ( 設定なし )互換コマンド なし

Page 44: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-24 (J) MG40 Series

●データヘッダデータヘッダを設定・取得します。

データヘッダ設定 セットアップモード イーサネット

データヘッダを設定する。コマンド形式 HDR=<ヘッダ >

< ヘッダ > 00 : なし01 : タイプ 1 ( 出荷時設定 )02 : タイプ 2タイプの詳細は 「5. データフォーマット」 参照

返信形式 実行結果対象 MG41 メインユニット設定値保存 保存する使用例 送信 : HDR=01 返信 : OK000互換コマンド なし

データヘッダ取得 セットアップモード 計測モード イーサネット

データヘッダ設定を取得する。コマンド形式 HDR?返信形式 HDR=< ヘッダ >

< ヘッダ > 00 : なし01 : タイプ 102 : タイプ 2

対象 MG41 メインユニット使用例 送信 : HDR? 返信 : HDR=01互換コマンド なし

データヘッダOn ( 互換コマンドのみ ) セットアップモード イーサネット

データヘッダをタイプ 1に設定する。コマンド形式 なし返信形式 実行結果対象 MG41 メインユニット使用例 送信 : HON 返信 : OK000互換コマンド HON

データヘッダOff ( 互換コマンドのみ ) セットアップモード イーサネット

データヘッダをなしに設定する。コマンド形式 なし返信形式 実行結果対象 MG41 メインユニット使用例 送信 : HOF 返信 : OK000互換コマンド HOF

Page 45: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-25MG40 Series

●データ軸区切りデータ出力の際の軸区切り文字の設定と取得を行ないます。

設定 セットアップモード イーサネット

データ出力時の軸区切りを設定する。

コマンド形式 SEP=<値 >< 値 > 0 : スペース ( 出荷時設定 )

1 : 改行 (CR+LF)

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存する

使用例 送信 : SEP=1 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット

データ出力時の軸区切りを取得する。

コマンド形式 SEP?返信形式 SEP=< 値 >

< 値 > 0 : スペース1 : 改行 (CR+LF)

対象 MG41 メインユニット

使用例 送信 : SEP? 返信 : SEP=1

互換コマンド なし

Page 46: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-26 (J) MG40 Series

●軸演算機能軸演算を設定・取得します。軸演算機能は、同一ユニット、同一入力分解能の両条件を満たした軸同士で設定可能です。演算結果は、主軸データとして出力されます。主軸として設定された軸は、参照軸としては設定できません。軸演算設定を取り消す場合は、プラス記号と軸ラベルのみを送信します。主軸として設定された軸に対しては、基準点機能とマスター合わせ機能は使用できません。参照軸として設定された軸に対しては、リセット / プリセット / 基準点機能 / マスター合わせ機能 / スタート / ポーズ / ラッチ / 出力データ / コンパレータ機能 / データ要求 / メモリデータ出力 / 出力分解能コマンドは使用できません。軸演算を設定すると、プリセット / 基準点 / マスター値 / コンパレータ値 / コンパレータ組番号 / ポーズ状態 / ラッチ状態はクリアされます。

設定 セットアップモード イーサネット CC-Link

軸演算を設定する。

コマンド形式 ADD=<符 1> 主軸 <符 2> 参照軸 ADD=+ 主軸 ( 設定取消 )

< 符 1>< 符 2> + : プラス 出荷時設定はなし- : マイナス

主軸 、 参照軸 軸ラベル

返信形式 実行結果対象 指定軸設定値保存 保存する

使用例 送信 : ADD=+[00A]+[00B] 返信 : OK000

送信 : ADD=-[31A]+[31D] 返信 : OK000

送信 : ADD=+[31A] ( 設定クリア ) 返信 : OK000互換コマンド なし

取得 セットアップモード 計測モード イーサネット CC-Link

軸演算設定を取得する。

コマンド形式 ADD 主軸 ?返信形式 ADD=< 符 1> 主軸 < 符 2> 参照軸

< 符 1>< 符 2> + : プラス- : マイナス

主軸 、 参照軸 軸ラベル

対象 指定軸

使用例 送信 : ADD[00A]? 返信 : ADD=+[00A]+[00B]

送信 : ADD[31A]? 返信 : ADD=-[31A]+[31D]

送信 : ADD[31A]? 返信 : ADD=+[31A] ( 設定なし )互換コマンド なし

Page 47: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-27MG40 Series

●構成情報機器構成情報を取得します。

取得 セットアップモード 計測モード イーサネット CC-Link

機器構成情報を取得する。

コマンド形式 CFG 対象機器 ?対象機器 [00∗] : MG41 メインユニット

[01∗] : MG42 ハブユニット ID01[02∗] : MG42 ハブユニット ID02・・・[31∗] : MG42 ハブユニット ID31[∗∗∗] : システム全体

返信形式 CFG 対象機器 = < ユニット台数 > < 軸総数 > < 接続 MAP>

対象機器 [00∗] : MG41 メインユニット[01∗] : MG42 ハブユニット ID01[02∗] : MG42 ハブユニット ID02・・・[31∗] : MG42 ハブユニット ID31[∗∗∗] : システム全体

< ユニット台数 > 01 ~ 32 : システムに存在するMG41メインユニッ トおよび MG42 ハブユニットの総数

< 軸総数 > 000 ~ 100 : システムに接続され、認識している軸の 総数

< 接続 MAP> {< 機種コード > <ID> < 接続パターン > ・・・}( 中括弧囲いスペース区切り )

< 機種コード > 11 : MG41-NE12 : MG41-NC21 : MG42-4

<ID> 00 ~ 31 : ユニット ID (MG41 メインユニットは 00)< 接続パターン > 00 ~ 0F : 接続されているところを 1 としたビット

パターン

対象 システム全体、指定対象 ID のユニット

使用例 送信 : CFG[∗∗∗]? ( システム全体の構成情報取得 )

返信 : CFG[∗∗∗]=04 008 {110003 21050A 21210C 213106}

送信 : CFG[00∗]? (MG41 メインユニットの構成情報取得 )

返信 : CFG[00∗]=04 008 {110003}

送信 : CFG[05∗]? (MG42 ハブユニット ID05 の構成情報取得 )

返信 : CFG[05∗]=04 008 {21050A}

送信 : CFG[21∗]? (MG42 ハブユニット ID21 の構成情報取得 )

返信 : CFG[21∗]=04 008 {21210C}

互換コマンド なし

Page 48: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-28 (J) MG40 Series

●設定初期化設定を初期化します。システム全体を工場出荷時状態へ初期化する場合は、INI[∗∗∗]=0 と設定してください。初期化した設定を MG41 メインユニットの不揮発性メモリに保存するためには、続けて設定値保存を行なってください。

→設定値保存 (SAV コマンド )

設定 セットアップモード イーサネット CC-Link

設定を初期化する。

コマンド形式 INI 指定軸 =<初期化レベル>< 初期化レベル > 0 : 出荷時状態 ( ネットワークの設定を除く )

1 : 数値設定初期化 ( プリセット / 基準点 / マスター値 / コンパレータ値 / コンパレータ組番号 )

返信形式 実行結果

対象 出荷時状態 : システム全体

数値設定初期化 : 指定軸、MG42 ハブユニット、全軸

使用例 送信 : INI[∗∗∗]=0 ( システム全体を出荷時状態に初期化 )

返信 : OK000

送信 : INII[03∗]=1 (MG42 ハブユニット ID03 の全軸の数値設定を初期化 )

返信 : OK000

互換コマンド なし

Page 49: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-29MG40 Series

●設定値保存現在の設定値を MG41 メインユニットの不揮発性メモリに保存します。保存された設定値は電源を切っても保持されます。設定値保存中に MG41 メインユニットの電源を切ると、設定値が失われる場合がありますので下記の点にご注意ください。 コマンド応答ありの場合   コマンド実行結果が返るまで電源を切らないでください。 コマンド応答なしの場合   設定値保存コマンド送信後、3 秒間は電源を切らないでください。

→コマンド応答 (CRP コマンド )

設定値保存 セットアップモード イーサネット CC-Link

設定値を保存する。

コマンド形式 SAV返信形式 実行結果

対象 システム全体

使用例 送信 : SAV 返信 : OK000

互換コマンド なし

Page 50: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-30 (J) MG40 Series

●バージョン情報MG41 メインユニット / MG42 ハブユニットのバージョン情報の設定と取得を行ないます。

取得 セットアップモード 計測モード イーサネット CC-Link

バージョン情報を取得する。

コマンド形式 VER 対象機器 ?対象機器 [00∗] : MG41 メインユニット

[01∗] : MG42 ハブユニット ID01[02∗] : MG42 ハブユニット ID02・・・ [31∗] : MG42 ハブユニット ID31

返信形式 VER 対象機器 = < バージョン番号 >

対象機器 [00∗] : MG41 メインユニット[01∗] : MG42 ハブユニット ID01[02∗] : MG42 ハブユニット ID02・・・ [31∗] : MG42 ハブユニット ID31

< バージョン情報 > バージョン情報

対象 MG41 メインユニット、MG42 ハブユニット

使用例 送信 : VER[00∗]? 返信 : VER[00∗]=S010000 F010100 P010000 B122

互換コマンド なし

Page 51: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-31MG40 Series

●エラー情報エラー情報を取得します。ログに蓄積されているエラーのうち、未送信で新しいものから順に送信します。

取得 セットアップモード 計測モード イーサネット CC-Link

エラー情報を取得する。

コマンド形式 ERR?返信形式 ERR = < 発生日時 > < 発生部位 > < エラーコード >

ERR = ( 未送信のエラーがない場合 )

< 発生日時 > DDHHMMSS 形式 (8 文字 )< 発生部位 > 対象機器コードまたは指定軸コード (5文字 )< エラーコード > 「6. エラーコード」 参照 (2 文字 )

対象 システム全体

使用例 送信 : ERR? 返信 : ERR=28123456 [01∗] A0

(28 日 12 時 34 分 56 秒に MG42 ハブユニット ID01 にて A0 エラー )

送信 : ERR? 返信 : ERR=28203400 [01B] 61

(28 日 20 時 34 分 00 秒にハブ ID01 の B 軸にて 61 エラー )

送信 : ERR? 返信 : ERR= ( エラーなし )

互換コマンド なし

Page 52: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-32 (J) MG40 Series

●内蔵時計MG41 メインユニット内蔵時計の設定と情報取得を行ないます。本製品での年表記は 2 桁となります。

設定 セットアップモード イーサネット CC-Link

MG41 メインユニットの内蔵時計の設定をする。

コマンド形式 CLK=<値 >

< 値 > YYMMDDHHMMSS 形式

返信形式 実行結果

対象 MG41 メインユニット

使用例 送信 : CLK=081212145632 (08 年 12 月 12 日 14 時 56 分 32 秒に設定 )

返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット CC-Link

MG41 メインユニットの内蔵時計の現在時刻を取得する。

コマンド形式 CLK?返信形式 CLK=< 値 >

< 値 > YYMMDDHHMMSS 形式

対象 MG41 メインユニット

使用例 送信 : CLK? 返信 : CLK=090228143012 (09 年 2 月 28 日 14 時 30 分 12 秒 )

互換コマンド なし

Page 53: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-33MG40 Series

●コマンド応答各コマンドに対して実行結果を返すかどうか設定します。応答なしに設定した場合でも、CRP コマンド自体の応答は返ります。

設定 セットアップモード イーサネット CC-Link

各コマンドに対する実行結果返信の有無を設定する。

コマンド形式 CRP=<値 >< 値 > 0 : 応答なし

1 : 応答あり ( 出荷時設定 )

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存する

使用例 送信 : CRP=0 返信 : OK000

送信 : CRP=1 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット CC-Link

実行結果返信の有無を取得する。

コマンド形式 CRP?返信形式 CRP=< 値 >

< 値 > 0 : 応答なし1 : 応答あり

対象 MG41 メインユニット

使用例 送信 : CRP? 返信 : CRP=1

互換コマンド なし

Page 54: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-34 (J) MG40 Series

●イーサネット局番号イーサネット局番号を取得します。設定は MG41 メインユニット DIP スイッチで行ないます。

取得 セットアップモード 計測モード イーサネット

イーサネット局番号を取得する。

コマンド形式 NID?< 局番号 > 00 ~ 07

返信形式 NID=< 局番号 >

対象 MG41 メインユニット

使用例 送信 : NID? 返信 : NID=03

互換コマンド なし

Page 55: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-35MG40 Series

● IP アドレスイーサネット自局 IP アドレスを設定・取得します。設定した値は次回起動時に反映されます。設定変更後に取得すると反映前の IP アドレスが取得されます。

設定 セットアップモード イーサネット

イーサネット自局 IP アドレスを設定する。

コマンド形式 NIP=<IP アドレス ><IP アドレス > 1.0.0.1 ~ 223.255.255.254 (127.x.x.x を除く )

( 出荷時設定 : 192.168.1.100)

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存する ( 設定コマンド実行と同時に設定値が保存されます。)

使用例 送信 : NIP=192.168.1.10 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット

イーサネット自局 IP アドレスを取得する。

コマンド形式 NIP?返信形式 NIP=<IP アドレス >

<IP アドレス > 1.0.0.1 ~ 223.255.255.254

対象 MG41 メインユニット

使用例 送信 : NIP? 返信 : NIP=192.168.1.10

互換コマンド なし

Page 56: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-36 (J) MG40 Series

●MACアドレスイーサネット MAC アドレスを取得します。

取得 セットアップモード 計測モード イーサネット

イーサネットMACアドレスを取得する。

コマンド形式 NMC?返信形式 NMC=<MAC アドレス >

<MAC アドレス > xx:xx:xx:xx:xx:xx (xは0~9およびA~F)

対象 MG41 メインユニット

使用例 送信 : NMC? 返信 : NMC=00:12:44:CE:3E:F5

互換コマンド なし

Page 57: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-37MG40 Series

●ゲートウェイアドレスイーサネットゲートウェイアドレスを設定・取得します。設定値は次回起動時に反映されます。

設定 セットアップモード イーサネット

イーサネットゲートウェイアドレスを設定する。

コマンド形式 NGW=<アドレス>< アドレス > 1.0.0.1 ~ 223.255.255.254 (127.x.x.x を除く )

( 出荷時設定 : 192.168.1.1)

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存する ( 設定コマンド実行と同時に設定値が保存されます。)

使用例 送信 : NGW=192.168.1.1 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット

ゲートウェイアドレスを取得する。

コマンド形式 NGW?返信形式 NGW=< アドレス >

< アドレス > 1.0.0.1 ~ 223.255.255.254

対象 MG41 メインユニット

使用例 送信 : NGW? 返信 : NGW=192.168.1.1

互換コマンド なし

Page 58: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-38 (J) MG40 Series

●サブネットマスクサブネットマスクを設定・取得します。設定した値は次回起動時に反映されます。設定変更後に取得すると反映前のサブネットマスクが取得されます。

設定 セットアップモード イーサネット

サブネットマスクを設定する。

コマンド形式 NSM=<サブネットマスク>< サブネットマスク > 0.0.0.0~255.255.255.255 (出荷時設定 : 255.255.255.0)

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存する ( 設定コマンド実行と同時に設定値が保存されます。)

使用例 送信 : NSM=255.255.0.0 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット

サブネットマスクを取得する。

コマンド形式 NSM?返信形式 NIP=< サブネットマスク >

< サブネットマスク > 0.0.0.0 ~ 255.255.255.255

対象 MG41 メインユニット

使用例 送信 : NSM? 返信 : NIP=255.255.255.0

互換コマンド なし

Page 59: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-39MG40 Series

●データ送出プロトコルデータインタフェースで使用するプロトコルを設定します。

設定 セットアップモード イーサネット

データインタフェースで使用するプロトコルを設定する。

コマンド形式 NPC=<値 >< 値 > 0 : TCP ( 出荷時設定 )

1 : UDP

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存する

使用例 送信 : NPC=0 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット

データインタフェースで使用するプロトコルを取得する。

コマンド形式 NPC?返信形式 NPC=< 値 >

< 値 > 0 : TCP1 : UDP

対象 MG41 メインユニット

使用例 送信 : NPC? 返信 : NPC=0

互換コマンド なし

Page 60: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-40 (J) MG40 Series

●データ送出ポート番号データインタフェースで使用するポート番号を設定します。インターネットでは 1 ~ 1023 は一般サービス使用されているポート番号、1024 ~ 49151 は登録済みである可能性があるため、一般的には 49152 番以降を使用します。ただし、企業内ネットワークの場合はその限りではないため、MG40 シリーズとしては IP 規格の全てのポート番号 1 ~ 65535 から 20、21、23、80 を除く範囲をサポート範囲とします。設定コマンドでエラーが発生する場合は、そのポート番号が使用不可能である可能性がありますので、異なるポート番号を試してください。

設定 セットアップモード イーサネット

データインタフェースで使用するポート番号を設定する。

コマンド形式 NPN=<値 >< 値 > 1 ~ 65535 (20、21、23、80、52023、52024 を除く )

( 出荷時設定 : 49154)

返信形式 実行結果

対象 MG41 メインユニット

設定値保存 保存する

使用例 送信 : NPN=49153 返信 : OK000

互換コマンド なし

取得 セットアップモード 計測モード イーサネット

データインタフェースで使用するポート番号を取得する。

コマンド形式 NPN?返信形式 NPN=< 値 >

< 値 > 1 ~ 65535 (20、21、23、80、52023、52024 を除く )

対象 MG41 メインユニット

使用例 送信 : NPN? 返信 : NPN=49153

互換コマンド なし

Page 61: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-41MG40 Series

●測長ユニット製品情報接続された測長ユニットの製品情報を取得します。

取得 セットアップモード イーサネット CC-Link

接続された測長ユニットの製品情報を取得する。

コマンド形式 AXP 指定軸 ?返信形式 AXP 指定軸 =< 製品コード > < 製造年月日 > < シリアル番号 >

< 製品コード > 製品コード (8 文字 )< シリアル番号 > シリアル番号 (6 文字 )< 製造年月日 > YYMMDD 形式 (6 文字 )

対象 指定軸

使用例 送信 : AXP[00A]? 返信 : AXP[00A]=12345678 100001 090220

互換コマンド なし

Page 62: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-42 (J) MG40 Series

●測長ユニットメンテナンス情報接続された測長ユニットのメンテナンス情報を取得します。

取得 セットアップモード イーサネット CC-Link

接続された測長ユニットのメンテナンス情報を取得する。

コマンド形式 AXM 指定軸 ?返信形式 AXM 指定軸 =< 累計エラー回数 > < 累計摺動回数 > < 累計通電時間 >

< 累計エラー回数 > 00000 ~ 65534 (5 文字 ) ※< 累計摺動回数 > 0000000 ~ 3354428 (7 文字 ) (1 = 往復 ) ※< 累計通電時間 > ( 時間 ) 00000 ~ 65534 (5 文字 ) ※

注意

・ 摺動時間は目安です。・ 摺動距離が往復 1 mm 以下の場合は、カウントされません。

※ 上限値に達すると、それ以降は上限値のまま変化しません。

対象 指定軸

使用例 送信 : AXM[00A]? 返信 : AXM[00A]=00001 0002343 00104 ( エラー回数 1 回、摺動回数 2343 往復、累計通電 104 時間 )

互換コマンド なし

Page 63: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 4-43MG40 Series

●測長ユニットユーザー情報接続された測長ユニットのユーザー情報を設定 / 取得します。

設定 セットアップモード イーサネット CC-Link

接続された測長ユニットのユーザー情報を設定する。

コマンド形式 AXU 指定軸 =<ユーザー ID> < ユーザー ID> 16進数アスキー表記 (2文字)

返信形式 実行結果

対象 指定軸

設定値保存 保存する ( 設定コマンド実行と同時に設定値が保存されます。)

使用例 送信 : AXU[00A]=01 返信 : OK000

互換コマンド なし

取得 セットアップモード イーサネット CC-Link

接続された測長ユニットのユーザー情報を取得する。

コマンド形式 AXU 指定軸 ?返信形式 AXU 指定軸 =< ユーザー ID>

< ユーザー ID> 16進数アスキー表記 (2文字)

対象 指定軸

使用例 送信 : AXU[00A]? 返信 : AXU[00A]=00

互換コマンド なし

Page 64: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-44 (J) MG40 Series

Page 65: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 5-1MG40 Series

5. データフォーマット

注意・ 「基準点オフセット記憶」、「基準点再現」、「マスター再現」、「マスター合わせ機能設定」を

行なった場合は、原点通過をさせないと「データ要求」、「メモリーデータ出力」ができません。・ 原点通過後はピーク値が不定となります。ピーク値を使用する場合は、「スタート」の設定

を行なってからピーク値を取得してください。

5-1. データフォーマット概要データフォーマットとは、次の場合に出力されるデータ形式です。

データフォーマット アスキーデータ ・ データ要求コマンド送信時に返されるデータ

バイナリデータ ・ イーサネットにおける連続データ送出機能を使用す る際のデータ ・ CC-Link におけるリモートレジスタ

5-2. アスキーデータデータ要求・メモリデータ出力コマンドの応答は、アスキーデータフォーマットとなります。

単軸のデータは以下のように構成されています。 ヘッダ データ CR LF

複数軸のデータは以下の例のように構成されています。(3 軸の場合 ) ヘッダ 1 データ 1 軸区切り ヘッダ 2 データ 2 軸区切り ヘッダ 3 データ 3 CR LF

ヘッダの内容は HDR ( データヘッダ ) コマンド、軸区切りは SEP ( 区切り文字 ) コマンドで選択可能です。

ヘッダタイプ ヘッダ仕様 例

なし ( ヘッダは出力されません ) ( ヘッダは出力されません )

タイプ 1 < 軸ラベル >= [00A]= [03B]= [31D]=

タイプ 2 < 軸ラベル >< コンパレータ結果 >< 出力データ > [00A]02C00= < エラー情報 >< 原点情報 >= [03B]14P00= [31D]00B02=

< 軸ラベル > 軸ラベルは下記のように出力されます。

[00A] = MG41 メインユニットの A 軸[00B] = MG41 メインユニットの B 軸[00C] = MG41 メインユニットの C 軸[00D] = MG41 メインユニットの D 軸 

[01A] = MG42 ハブユニット #01 の A 軸[01B] = MG42 ハブユニット #01 の B 軸[01C] = MG42 ハブユニット #01 の C 軸[01D] = MG42 ハブユニット #01 の D 軸・ ・・ ・・ ・[31A] = MG42 ハブユニット #31 の A 軸[31B] = MG42 ハブユニット #31 の B 軸[31C] = MG42 ハブユニット #31 の C 軸[31D] = MG42 ハブユニット #31 の D 軸

Page 66: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

5-2 (J) MG40 Series

< コンパレータ結果> コンパレータの結果は、設定段数に応じて 00 ~ 16 の 2 桁整数で表現されます。

0 :      計測値 < 設定値 11 : 設定値 1 ≦ 計測値 < 設定値 22 : 設定値 2 ≦ 計測値 < 設定値 3 ・ ・ ・ 15 : 設定値 15 ≦ 計測値 < 設定値 1616 : 設定値 16 ≦ 計測値

< 出力データ> 出力しているデータの種類をアルファベット 1 文字で表します。

C : 現在値  A : 最大値  I : 最小値  P : P-P 値  B : ABS 値

< エラー情報> 軸のエラー情報を 16 進数 1 桁ビットパターンで表します。

7 6 5 4 3 2 1 0

予約 (常にゼロ) レベルアラーム スピードアラーム

0 : エラー・アラームなし1 : スピードアラーム発生中2 : レベルアラーム発生中3 : スピードアラームとレベルアラームが発生中

< 原点情報 > 原点検出の状態を 16 進数 1 桁の数値で表します。

0 : 原点未検出 1 : 原点通過待ち2 : 原点検出済み

データは出力分解能で設定された分解能で、符号付き小数点付きゼロサプレス 7 桁データで出力されます。値が正値の場合のプラス符号はスペースになります。

-123.4567

- 1 2 3 . 4 5 6 7

0.2900

0 . 2 9 0 0

測長ユニットがスピードアラーム・レベルアラーム状態の場合、リセットを行なうまでは、Error の文字が出力されます。

Error

E r r o r

測長結果データが 7 桁を超える場合は、オーバーフローを表すために最上位桁に F を出力します。F が出力されない範囲で使用してください。

-1000.2531 を表示する場合

- F 0 0 . 2 5 3 1

Page 67: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 5-3MG40 Series

5-3. バイナリデータバイナリデータフォーマットが使用されるのは以下の場合です。・ イーサネットで TCP または UDP プロトコルを使用した連続データ転送機能を使用した場合・ CC-Link でデータ要求を行なう場合

バイナリデータフォーマットは、有効軸が 1 本でも接続されているユニット ( メインユニットまたはハブユニット ) を有効と見なして、1 ユニットあたり 32 バイトの固定長データを使用します。接続されていない軸のステータスおよびデータは全てゼロとなります。

イーサネットの場合 :最小データサイズ : 有効ユニット 1 個 ( 有効軸 1 ~ 4 本 ) : 32 バイト

ハブユニットID02 データ32 Bytes

最大データサイズ : 有効ユニット 25 個 ( 有効軸 25 ~ 100 本 ) : 800 バイト

メインユニットID00 データ32 Bytes

(ID00 は、MG41メインユニット固定 )

ハブユニットID01 データ32 Bytes

ハブユニットID02 データ32 Bytes

ハブユニットID31 データ32 Bytes

CC-Link の場合 :リモートレジスタのサイズが 32 バイトであるため、常に指定の単一ユニットのデータを指定し取得します。複数のユニットのデータを取得する場合は、PLC から順次コマンドを発行して取得してください。

ハブユニットID05 データ32 Bytes

複数のユニットのデータ同期をするためには、ラッチコマンドを使用して、あとからメモリデータ出力コマンドでユニットごとのデータを集めます。

Page 68: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

5-4 (J) MG40 Series

ユニットのデータ構成は、以下のとおりです。軸データは符号あり 32 bits 整数をリトルエンディアンで格納します。

Byte 内容00 A 軸ステータス0102

A 軸データ符号あり 32 bits 整数リトルエンディアン

03040506 B 軸ステータス0708

B 軸データ符号あり 32 bits 整数リトルエンディアン

09101112 C 軸ステータス1314

C 軸データ符号あり 32 bits 整数リトルエンディアン

15161718 D 軸ステータス1920

D 軸データ符号あり 32 bits 整数リトルエンディアン

21222324

付帯情報

25262728293031

●軸ステータス

bit

Byte 7 6 5 4 3 2 1 0

0 軸ラベル 小数点位置

1 エラー情報 原点情報

軸ラベル : 0 : 未接続 ( データなし ) 1 : A 軸 2 : B 軸 3 : C 軸 4 : D 軸

エラー情報: 軸のエラー情報を 16進数 1桁ビットパターン で表します。 bit0 : スピードアラーム bit1 : レベルアラーム bit2 : 通信エラー bit4 : 予約 ( 常にゼロ )

小数点位置 : 整数で格納されている測長結果データを長さの 単位にするための係数を格納します。 0 : ×10 0

1 : ×10-1

2 : ×10-2

3 : ×10-3

4 : ×10-4

5 : ×10-5

6 : ×10-6

7 : ×10-7

原点情報: 原点検出の状態を16進数1桁の数値で表します。 0 : 原点未検出  1: 原点通過待ち 2: 原点検出済み

Page 69: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 5-5MG40 Series

●軸データ

bit

Byte 7 6 5 4 3 2 1 0

0

軸データ32bits 整数リトルエンディアン

1

2

3

軸の測長結果を 32bit 符号ありリトルエンディアンで格納します。 軸ステータスのエラー情報が 0 でない場合はエラーが発生していますので、軸データは使

用しないでください。

●付帯情報

bit

Byte 7 6 5 4 3 2 1 0

0 ハブユニット ID

1 A軸コンパレータ結果

2 B軸コンパレータ結果

3 C軸コンパレータ結果

4 D軸コンパレータ結果

5

タイムスタンプ6

7

ハブユニット ID : ハブユニット ID (0 ~ 31)コンパレータ結果 : 0 : 計測値 < 設定値 1 1 : 設定値 1 ≦ 計測値 < 設定値 2 2 : 設定値 2 ≦ 計測値 < 設定値 3 ・ ・ ・ 15 : 設定値 15 ≦ 計測値 < 設定値 16 16 : 設定値 16 ≦ 計測値

タイムスタンプ : MG41 メインユニット内蔵時計の午前 0時を 基準とした1/128秒 (7.8125ミリ秒) カウンタ値。

Page 70: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

5-6 (J) MG40 Series

Page 71: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(J) 6-1MG40 Series

6. エラーコード

6-1. エラーコード概要エラーコードは 16 進 2 桁 (0x00 ~ 0xFF) で表現されます。上位桁で大まかな分類、下位桁で詳細を表現します。

分類 内容

00 番台 一般情報

10 番台 コマンド関連

20 番台 イーサネット通信関連

30 番台 CC-Link 通信関連

A0 ~ D0 番台 ハードウェア関連

6-2. エラーコード表

00 番台 : 一般情報・追加情報

00 エラーなし / 追加情報なし ( 通常はエラーなしの際に使用します。)

10 番台 : コマンド関連

10 コマンドエラー コマンドが存在しない、またはコマンドの構文が不正です。

12 モードエラー そのコマンドが実行を許されているモードではありません。

13 ターゲットエラー コマンドターゲットに指定したターゲットがシステムに接続されていないか、指定方法が誤っています。 ( 全軸指定できないコマンドで全軸指定した場合など )

14 パラメータエラー パラメータが存在しないか、指定方法が誤っています。

20 番台 : イーサネット通信関連

20 ネットワーク設定エラー ネットワーク設定に問題があります。

21 コマンドインタフェース接続エラー

コマンドインタフェースとの接続に失敗しました。

22 データインタフェース接続エラー

データインタフェースとの接続に失敗しました。

30 番台 : CC-Link 通信関連

30 DIP スイッチ設定エラー 局番設定スイッチか伝送速度設定スイッチが仕様範囲外に設定されています。

31 通信エラー 通信がタイムアウトしました。ケーブル抜け・ケーブル断線・装置故障の可能性があります。

Page 72: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

6-2 (J) MG40 Series

A0 番台 : メインユニットハード関連

A0 通信タイムアウト 通信がタイムアウトしました。ケーブル抜け・ケーブル断線・電源異常・装置故障の可能性があります。

A1 通信異常 通信内容にエラーがあります。ノイズ・ケーブル異常・装置故障の可能性があります。

A2 電源異常 電源電圧が不足しています。電源を確認してください。

A4 バージョンエラー 動作可能なバージョンの組み合わせではありません。

A5 設定値保存メモリエラー 設定値を保存しているメモリの内容が異常なため、工場出荷状態値に初期化されました。

B0 番台 : ハブユニットハード関連

B0 通信タイムアウト 通信がタイムアウトしました。ケーブル抜け・ケーブル断線・電源異常・装置故障の可能性があります。

B1 通信異常 通信内容にエラーがあります。ノイズ・ケーブル異常・装置故障の可能性があります。

B2 電源異常 電源電圧が不足しています。電源を確認してください。

C0 番台 : 測長ユニット関連

C0 通信異常 測長ユニットが通信系のエラーを検知しました。

C1 システム異常 測長ユニットがシステム異常を検知しました。

Page 73: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) iMG40 Series

Contents

1. Overview ................................................................................ 1-11-1. Overview of the Commands ................................................................................ 1-1

1-1-1. Setting Commands and Acquisition Commands .......................... 1-11-1-2. Command Classifi cation ................................................................... 1-1

1-2. Command Syntax .................................................................................................. 1-21-3. Execution Results and Errors .............................................................................. 1-3

2. Ethernet Interfaces ............................................................... 2-12-1. Overview of Ethernet Interfaces ........................................................................ 2-12-2. Connection to the Ethernet Interfaces ............................................................... 2-2

2-2-1. Connection to the Command Interface .......................................... 2-22-3. Initial Setting Procedure ...................................................................................... 2-32-4. Setting Examples ...................................................................................................2-4

2-4-1. Connections .........................................................................................2-42-4-2. Setting the Measurement Conditions ..............................................2-42-4-3. Starting the Measurements ...............................................................2-6

2-5. When Both the Command Interface and Data Interface Are Used .............. 2-72-5-1. Setting the Measurement Conditions .............................................. 2-72-5-2. Starting the Measurements ...............................................................2-8

3. CC-Link Interface ................................................................... 3-13-1. Overview of CC-Link Interface ........................................................................... 3-13-2. CC-Link Address Maps ........................................................................................ 3-23-3. CC-Link Command Transmission Sequences .................................................. 3-3

4. Command Reference ............................................................. 4-14-1. List of Commands ................................................................................................. 4-14-2. How to Read the Command Tables .................................................................... 4-34-3. Operation Commands ..........................................................................................4-44-4. Setup Commands ................................................................................................ 4-18

5. Data Formats ......................................................................... 5-15-1. Overview of Data Formats ................................................................................... 5-15-2. ASCII Data ............................................................................................................. 5-15-3. Binary data ............................................................................................................. 5-3

6. Error Codes ............................................................................ 6-16-1. Overview of Error Codes...................................................................................... 6-16-2. Table of Error Codes ............................................................................................. 6-1

Page 74: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

ii (E) MG40 Series

Page 75: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 1-1MG40 Series

1. Overview

1-1. Overview of the Commands

Th e term “command” refers to the language used for the control which is exercised in order for the computer or PLC to instruct the MG40 series to carry out operations or acquire information from the series.By using the commands correctly, it is possible to establish the MG40 series settings, issue instructions for the series to operate and to acquire its statuses, measurement results and other information.

1-1-1. Setting Commands and Acquisition Commands

Th e “setting commands” are commands which are used to instruct that settings be established in the MG41 or that operations be performed by the MG41.Th e “acquisition commands” are commands which are used to instruct that information or data be acquired from the MG41.

Information sent to MG41 Information returned from MG41

Setting commands Setting parameters ∗ Execution resultsAcquisition commands Parameters required for acquisition ∗ Information/data

∗ There are some commands which do not have any parameters.

It is also possible to establish a setting so that the execution results of the setting commands will not be returned. → CRP command

1-1-2. Command Classifi cation

Command groupsCommand groups: Classifi cation of the commands by purpose or situation

Command group Purpose

Setup commands Basic settings such as advance preparations for measurementsOperation commands Operations and settings while measurements are underwayData request commands Acquisition of measurement result data

Command targetsCommand targets: Target of the commands and extent of the eff ect of the commands

Command targets

Entire systemMeasurement axesMeasuring unit

ReferenceReference

Page 76: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

1-2 (E) MG40 Series

1-2. Command Syntax

Group Target Transmission Return

Setup commands/operation commands

Entire system Settings = CR LF Execution results

Acquisition ? CR LF = CR LF

Measurement axes/measuring unit

Settings Designated axis = CR LF Execution results

Acquisition Designated axis ? CR LF Designated axis = CR LF

Data request commands

Measurement axes

Acquisition R CR LF → Data format

r Designated axis CR LF → Data format

: Command

: Setting value/parameter

CR LR : Line feed (CR + LF)

Designated axis : Designated axis [ ]

Designates the unit. Designates the axis.

∗: All axes targeted.

[∗∗∗] = All axes[00∗] = All axes for MG41 main unit[01∗] = All axes for MG42 hub unit #01[02∗] = All axes for MG42 hub unit #02 . . . . . .[31∗] = All axes for MG42 hub unit #31

[00A] = Axis A for MG41 main unit[00B] = Axis B for MG41 main unit[00C] = Axis C for MG41 main unit[00D] = Axis D for MG41 main unit

[01A] = Axis A for MG42 hub unit #01[01B] = Axis B for MG42 hub unit #01[01C] = Axis C for MG42 hub unit #01[01D] = Axis D for MG42 hub unit #01 . . . . . .[31A] = Axis A for MG42 hub unit #31[31B] = Axis B for MG42 hub unit #31[31C] = Axis C for MG42 hub unit #31[31D] = Axis D for MG42 hub unit #31

Th e “= ” part is abbreviated for commands with no parameters.

Page 77: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 1-3MG40 Series

1-3. Execution Results and Errors

When a setting command or acquisition command is sent, the MG41 main unit checks the command syntax and parameters, and returns the result.

When a command has been executed When an error has been detected successfully

Setting commands Aft er the command has been executed, An error is returned. the execution results are returned. Acquisition commands Th e acquisition results are returned. An error is returned.

Execution resultsTh e results are returned in the fi xed length of 5 characters + CR LR .

Example: ER212 (error occurrence, error, mode error)

Execution results OK or error Error level Error code OK : Successful completionER : Error occurrence

0 : Successful completion/ acknowledgment2 : Error3 : Fatal error

(for details on the error codes, refer to “6. Error Codes”.)

OK000 (successful completion, successful completion/acknowledgment, no error/no additional information)

Page 78: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

1-4 (E) MG40 Series

Page 79: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 2-1MG40 Series

2. Ethernet Interfaces

2-1. Overview of Ethernet Interfaces

Th e MG41 main unit supports two interfaces with the Ethernet. Connection to the command interface must be made without fail.

Type of interface Protocol Purpose

Command transmission/reception

Data acquisition

Command interface

telnet or TCP

Possible Th e ASCII data is successively acquired using the data acquisition command.

Data interface TCP or UDP Not possible Binary data is continuously transferred.

Use the interfaces corresponding to the specifi cations of the soft ware to be created.

When only the command interface is used

• Th e connections are straightforward.• A simple system can be confi gured because the data and commands use the

ASCII format.• Th e data transfer rate is slower than when the command interface is used together

with the data interface.

When both the command interface and data interface are used

• Th e application must manage two interfaces and ensure that each is best used according to the prevailing conditions and functions used.

• Binary data must be interpreted and computed.• Higher data transfer rates can be expected.

For an example of a case where only the command interface is used, refer to “2-4. Setting Examples”; for an example of a case where both the command interface and data interface are used, refer to “2-5. When Both the Command Interface and Data Interface Are Used”.

A protocol of the application layer of its own is stipulated for the data interface. Th is means that if the interface is to be connected to an existing network, it may be necessary to apply to the network administrator for the connection and/or change the network equipment settings and/or computer security settings.

ImportantImportant

Page 80: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

2-2 (E) MG40 Series

2-2. Connection to the Ethernet Interfaces

2-2-1. Connection to the Command Interface

Take the following steps to connect to the command interface.

1 Connect the MG41 main unit to the computer or PLC using an Ethernet cable.

2 Establish the connection settings below.Protocol telnet TCPIP address IP address which has been set (∗) (factory setting: 192.168.1.100)Port number TCP #23 TCP #10023Line feed code CR LF

(∗) If the IP address which has been set is not known, set SW8 among the communication setting

switches on the side panel of the MG41 main unit to ON, and then restart the unit. By doing this, it is temporarily possible to connect to 192.168.1.100 which was the address set at the factory. (Refer to “9. Troubleshooting” in the operating instructions.)

ReferenceReference

[telnet]3 Connect to the command interface. When connection is made to the command interface, a

login prompt such as the one shown in the fi gure below is output from the MG41 main unit.

login:

4 Input “MG41” as the login name, and transmit the line feed code.

login: MG41 CR LF

“Password:” now appears.

Password:

5 Input MG41 as the password, and transmit the line feed code.

login: MG41 CR LFPassword: MG41 CR LF

Th is completes the connection to the command interface.

[TCP]3 Connect to the command interface.

Th is completes the connection to the command interface.

Page 81: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 2-3MG40 Series

2-3. Initial Setting Procedure

Th e following initial settings must be established without fail aft er installation.Th ese settings must be established aft er the connection to the command interface has been completed. (Refer to “2-2-1. Connection to the Command Interface”.)

Setting the area where the system is to be used1 <If the system is to be used in Japan> Input the following command:

CTR=1 CR LF <If the system is to be used in any other country> Input either of the following commands: (For details, refer to “Area of use.”) → CTR command

CTR=2 CR LFCTR=3 CR LF

...... When the command has been input successfully, the following is returned:

OK000 CR LF

Setting the IP address2 Refer to the example given below, and set the IP address that corresponds to the network which will be

used. <Example> When setting the IP address to 192.168.1.10 Input the following command:

NIP=192.168.1.10 CR LF

...... When the command has been input successfully, the following is returned:

OK000 CR LF

Th is now completes the initial settings.

∗ Th ere is no need to set again the area where the system is to be used unless the settings have been initialized.

∗ Th e new IP address setting will be refl ected the next time the unit is started up.

<Concerning command return errors>If a return starting with ER is sent instead of OK000 aft er a command has been sent, it means that an error has occurred.(Refer to “6. Error Codes”.)

Return Description of error Checkpoint

ER210 Possible command recognition error Are the command format and its alphabet letters correct?ER214 Possible parameter error Is the numerical value following the equals sign correct?

If a return is not sent even when a command has been sent, it is possible that the “no response” has been set as the command response. When “response” is set using the command response command (CRP), a return will be sent. → CRP command

ReferenceReference

Page 82: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

2-4 (E) MG40 Series

2-4. Setting Examples

Provided below are the steps taken and examples of the settings for the setup command, operations and data acquisition using the command interface.

2-4-1. Connections

Make the connection to the command interface. (Refer to “2-2-1. Connection to the Command Interface”.)

2-4-2. Setting the Measurement Conditions

Switching over to the setup modeUse the MOD command to set “0” which signifi es the setup mode. → MOD command

MOD=0 CR LFOK000 CR LF

Acquiring the confi guration informationUse the CFG command to acquire the confi guration information of the MG42 hub units connected to the MG41 main unit and on the measurement axes. → CFG command

CFG[∗∗∗]? CR LF

Th e following kind of confi guration information can be acquired.

CFG[∗∗∗]=02 004{110003 210109} CR LF (One MG42-4 unit is connected to the MG41-NE unit, and two measuring units are connected to each

of these units.)

Comparator settings

NotePlease set the comparator values (CMV command) immediately aft er the comparator mode (CMM command) has been set. Th e comparator values (CMV command) is set in combination with the comparator mode (CMM command) and will not function correctly if it is made aft er other command setting(s).

Example: Settings established under the following conditions• No. of comparator level : 4• Comparator target : Current value• Comparator values

Level Axis [00A] [01D]

Level 4 0.002 0.010

Level 3 0.001 0.005

Level 2 0.000 0.002

Level 1 –0.001 0.000

Page 83: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 2-5MG40 Series

1 Use the CMM command to set “1” which signifi es 4 levels and “0” which signifi es the current value. → CMM command

CMM=1 0 CR LFOK000 CR LF

2 Use the CMV command to set the comparator values. (In this example, the comparator values are set to group number 1.)

→ CMV command

CMV[00A]0101=-0.001 CR LFOK000 CR LF

CMV[00A]0102=0.000 CR LFOK000 CR LF

CMV[00A]0103=0.001 CR LFOK000 CR LF

CMV[00A]0104=0.002 CR LFOK000 CR LF

CMV[01D]0101=0.000 CR LFOK000 CR LF

CMV[01D]0102=0.002 CR LFOK000 CR LF

CMV[01D]0103=0.005 CR LFOK000 CR LF

CMV[01D]0104=0.010 CR LFOK000 CR LF

3 Use the CMS command to set the comparator setting group number to be used. (In this example, the comparator group number is set as group number 1.)

→ CMS command

CMS[00A]=01 CR LFOK000 CR LF

CMS[01D]=01 CR LFOK000 CR LF

Page 84: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

2-6 (E) MG40 Series

Setting the data format

<Example> Setting “2” as the data header type and “space” as the separator characterData header type1 Use the HDR command to set “02” which signifi es type 2. → HDR command

HDR=02 CR LFOK000 CR LF

Data axis separator2 Use the SEP command to set “0” which signifi es a space. → SEP command

SEP=0 CR LFOK000 CR LF

2-4-3. Starting the Measurements

Switching over to the measurement modeAft er the settings of the measurement conditions have been completed, switch over to the measurement mode.

1 Use the MOD command to set “1” which signifi es the measurement mode. → MOD command

MOD=1 CR LFOK000 CR LF

Acquiring the data

<Example> Outputting the data of all the axes → R command, r command

1 Transmit the R command which signifi es the request data of all axes.

R CR LF

Example of the data of all axes

[00A]04C00=0.0050[00B]00C00=-123.4567[01A]00C00=-1.2900[01D]02C00=0.0030 CR LF → Data format (ASCII data)

Reference Th e data request command re-calculates the data and outputs it so an error results if there is an axis whose data updating

has been fi xed by the latch or pause setting.

Page 85: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 2-7MG40 Series

2-5. When Both the Command Interface and Data Interface Are Used

While referring to “2-4. Setting Examples,” make the connection to the command interface, and establish the necessary settings.

2-5-1. Setting the Measurement Conditions

For details on “Switching over to the setup mode,” “Acquiring the confi guration information” and “Comparator settings,” refer to “2-4-2. Setting the Measurement Conditions”.

Setting the gateway addressSet the gateway address if the network requires that it be set. For details on whether it is needed and its setting, consult the network administrator.

<Example> Setting 192.168.1.2541 Use the NGW command to set the gateway address. → NGW command

NGW=192.168.1.254 CR LFOK000 CR LF

Setting the data transmission protocolSet the protocol which is to be used by the data interface.

<Example> Setting TCP1 Use the NPC command to set “0” which signifi es TCP. → NPC command

NPC=0 CR LFOK000 CR LF

Setting the data transmission port numberSet the port number which is to be used by the data interface.First consult with the network administrator, and use a port number whose use is permitted.

NoteBear in mind that if a port number already being used by the existing network is set by mistake, not only will it be impossible to receive data but the operations of the other network devices may be impeded as well.

Reference

Usually, 49152 or a higher number is used as the port number.Port numbers 1 to 1023 : Th ese may have already been reserved by regular internet services.Port numbers 1024 to 49151 : Th ese may already be used by other systems.

<Example> Setting 49154 as the port number1 Use the NPN command to set 49154 as the port number. → NPN command

NPN=49154 CR LFOK000 CR LF

Page 86: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

2-8 (E) MG40 Series

ConnectionsEstablish the TCP connection from the soft ware.

1 Make the connection to the command interface. (Refer to “2-2-1. Connection to the Command Interface”.)

2 Establish the connection settings given below.

Protocol TCP

IP address Same as for the command interfacePort number Port number designated by the command

3 Make the connection to the TCP server of the MG41 main unit.

No connections are required if UDP has been selected as the protocol. When UDP is selected, prepare to receive at the designated port number.

2-5-2. Starting the Measurements

Switching over to the measurement modeAft er the settings of the measurement conditions have been completed, switch over to the measurement mode.

1 Use the MOD command to set “1” which signifi es the measurement mode. → MOD command

MOD=1 CR LFOK000 CR LF

Starting the data transmissionSet transmission start using the data transmission control settings. → NDT command

1 Use the NDT command to set “1” which signifi es transmission start.

NDT=1 CR LFOK000 CR LF

When the data output control command is sent, the data is sent continuously from the data interface so the necessary processing must be performed by the soft ware.Th e data sent is in the binary format. For details, refer to “5. Data Formats”.

Stopping the data transmissionSet transmission stop using the data transmission control settings. → NDT command

1 Use the NDT command to set “0” which signifi es transmission stop.

NDT=0 CR LFOK000 CR LF

ReferenceReference

Page 87: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 3-1MG40 Series

3. CC-Link Interface

3-1. Overview of CC-Link Interface

Th e CC-Link interface of the MG41-NC operates as a remote device station complying with CC-Link Ver.1.1 to enable data communication with the CC-Link master station using cyclic transmission.

Protocol CC-Link Ver.1.1 complied withStation type Remote device stationNo. of occupied stations 4Station numbers 1 to 61 set using DIP switchesTransmission speed 156 kbps, 625 kbps, 2.5 Mbps, 5 Mbps, 10 Mbps (set using DIP switches)Cyclic transmission data Remote input/output (RX/RY) Remote register (RWr/RWw)

Th e following two types of data input/output are used by the CC-Link interface.

Remote input/output Bit input/output expressed by RX and RY; the input and output are separate with each having 128 bits; used for communication handshaking and status notifi cation.

Remote registers Word input/output expressed by RWr and RWw; there are 16 inputs and 16 outputs, a register having a total of 32 bytes; used for command and data communication.

Page 88: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

3-2 (E) MG40 Series

3-2. CC-Link Address Maps

Shown below are the address maps when “1” is set as the station number.

● Remote input/output

StationMG41-NC → PLC PLC → MG41-NC

Remote input Name Remote output Name

1 RX00 IRX RY00 IRY

RX01 Reserved RY01 Reserved

RX02 RY02

| | |4 RX7B RDY |

| Reserved |RX7F RY7F

IRX : Interlock (MG41-NC → PLC)IRY : Interlock (PLC → MG41-NC)RDY : Remote READY (MG41-NC → PLC)

● Remote register

StationMG41-NC → PLC PLC → MG41-NC

Remote register Name Remote register Name

1 RWr00 Receive buff er RWw00 Transmitbuff er

| | |4 RWr0F RWw0F

Receive buff er : Th e data returned from the MG41-NC is stored here. (Total 32 bytes)Transmit buff er : Th e data sent to the MG41-NC is stored here. (Total 32 bytes)

When commands are sent or execution results are returned, the buff ers are used to hold 32 ASCII code characters; when data is transferred, they are used to hold binary data complying with the binary data format specifi cations.

Page 89: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 3-3MG40 Series

3-3. CC-Link Command Transmission Sequences

Th ese steps are taken to transmit the commands using the CC-Link interface and acquire the response.

000 11

000 11

Command setting completed

Response received

Command execution completed

Command Next command

Next command responseCommand response

Command execution completed

Response reception check

Response reception check

Command setting completed

Response received

IRY(PLC→MG41-NC)

IRX(MG41-NC→PLC)

MG41-NC receive buffer(PLC→MG41-NC)

PLC receive buffer(MG41-NC→PLC)

Th e sequence is as follows when viewed from the PLC side.

1 Th e command is written into the transmit buff er.

2 “1” is set for IRY. (Th e execution of the command is instructed.)

3 Th e PLC waits for IRX to be set to “1.” (Th e PLC waits for the command execution to be completed.)

4 When IRX is set to “1,” the command response is acquired.

5 When the response is acquired, IRY is set to “0.” (Th e response is received.)

6 Th e PLC waits for IRX to be set to “0.” (Th e PLC waits for the response reception to be checked.)

Th e sequence is as follows when viewed from the MG41-NC main unit side.

1 “1” is set for IRY, and command execution is instructed.

2 Th e command is read from the buff er, and it is executed.

3 Th e response is written in the buff er, and “1” is set for IRX. (Th e command execution is completed.)

4 Th e MG41 waits for IRY to be set to “0.” (Th e MG41 waits for the response to be received.)

5 “0” is set for IRX. (Th e MG41 checks that the response has been received.)

Page 90: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

3-4 (E) MG40 Series

Page 91: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-1MG40 Series

4. Command Reference

4-1. List of Commands

List of operation commands

Function Command Setup mode

Measurement mode Ethernet CC-Link Page

Operation mode Set MOD=<Operation mode> 4-4Acquire MOD? 4-4

Reset Set SVZ Designated axis × 4-5Preset Set PSS Designated axis =<Value> × 4-6

Acquire PSS Designated axis ? × 4-6Call PSR Designated axis × 4-6

Datum point Set DPT Designated axis =<Value> × 4-7Acquire DPT Designated axis ? × 4-7Store datum point off set value

DPS Designated axis × 4-7

Relocate datum point

DPR Designated axis × 4-7

Release wait to go past reference point status

DPC Designated axis× 4-7

Reference point information Acquire STR Designated axis ? × 4-8

Master Set master calibration value

MCV Designated axis =<Value> × 4-9

Acquire master calibration value

MCV Designated axis ? × 4-9

Relocate master calibration value

MCR Designated axis × 4-9

Start Set STA Designated axis × 4-10Pause Set pause PAU Designated axis =<Setting

value> × 4-11

Acquire pause status PAU Designated axis ? × 4-11Latch Set latch LCH Designated axis =<Setting

value> × 4-12

Acquire latch status LCH Designated axis ? × 4-12Output data Set output data OPD Designated axis =<Value> 4-13

Acquire output data OPD Designated axis ? 4-13Comparator group number Set CMS Designated axis =<Group

number> 4-14

Acquire CMS Designated axis ? 4-14Data request Request data of all

axesR × × 4-15

Request data of designated axis

r Designated axis × 4-15

Memory data output

Current values MRC Designated axis ? × 4-16Maximum values MRA Designated axis ? × 4-16Minimum values MRI Designated axis ? × 4-16Peak to peak values MRP Designated axis ? × 4-16ABS values MRB Designated axis ? × 4-16

Data transmission control

Set NDT=<Value> <Standby time> × × 4-17Acquire NDT? × 4-17

Page 92: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-2 (E) MG40 Series

List of setup commands

Function Command Setup mode

Measurement mode Ethernet CC-Link Page

Output resolution Set OPR Designated axis =<Polarity><Resolution>

× 4-18

Acquire OPR Designated axis ? 4-18Input resolution Acquire IPR Designated axis ? 4-19Master calibration function

Set MCM=<Value> × 4-20Acquire MCM? 4-20

Area of use Set CTR=<Value> × 4-21Acquire CTR? 4-21

Comparator mode

Set CMM Designated axis =<Mode> <Target value>

× 4-22

Acquire CMM Designated axis ? 4-22Comparator value Set CMV Designated axis <Group

number><Level number>=<Value>× 4-23

Acquire CMV Designated axis <Group number><Level number>?

4-23

Data header Set data header HDR=<Header> × × 4-24Acquire data header

HDR? × 4-24

Data axis separator

Set SEP=<Value> × × 4-25Acquire SEP? × 4-25

Axis calculation function

Set ADD=<Sign 1> Primary axis <Sign 2> Reference axis × 4-26

Acquire ADD Primary axis ? 4-26Confi guration information

Acquire CFG Target equipment ? (∗) 4-27

Setting initialization

Set INI Designated axis =<Initialization level>

× 4-28

Save setting values Save setting values

SAV × 4-29

Version information Acquire VER Target equipment ? 4-30Error information Acquire ERR? 4-31Internal clock Set CLK=<Value> × 4-32

Acquire CLK? 4-32Command response

Set CRP=<Value> × 4-33Acquire CRP? 4-33

Ethernet station number

Acquire NID? × 4-34

IP address Set NIP=<IP address> × × 4-35Acquire NIP? × 4-35

MAC address Acquire NMC? × 4-36Gateway address Set NGW=<Address> × × 4-37

Acquire NGW? × 4-37Subnet mask Set NSM=<Subnet mask> × × 4-38

Acquire NSM? × 4-38Data transmission protocol

Set NPC=<Value> × × 4-39Acquire NPC? × 4-39

Data transmission port number

Set NPN=<Value> × × 4-40Acquire NPN? × 4-40

Measuring unit product information

Acquire AXP Designated axis ? × 4-41

Measuring unit maintenance information

Acquire AXM Designated axis ?× 4-42

Measuring unit user information

Set AXU Designated axis =<User ID> × 4-43Acquire AXU Designated axis ? × 4-43

(∗) : The target equipment is specifi ed.

Page 93: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-3MG40 Series

4-2. How to Read the Command Tables

A detailed description of each command is given in the following sections. How to read the command tables is explained below.

Set Setupmode Ethernet CC-Link

Measurementmode

PSS Designated axis

: PSS[01B]=123.231501B]=123.2315

The command sets the numerical values in the current values.Command format

Return format

Target

Compatible command Designated axis P=<Value>

Return : OK000 (Successfully completed.)

(Set axis B for the MG42 hub unit ID01 to 123.2315.)

Designated axis, MG42 hub unit, all axes

Execution results

<Value> Corresponds to output resolution

=<Value>

Examples of use Transmission

Save setting values Setting values saved.

Indicates the modeswhich can be executed.

Indicates the command to be sent.

Indicates the interface which iscapable of executing the commands.

Indicates the return in response to the command sent.Indicates the command's target range.This indicates whether the setting values can be saved. To save the setting values, use the SAV command.

This command emphasizes compatibilitywith our existing products.There are some cases where there are no compatible commands.

Concerning the Designated axis

Input the designated axes by referring to the information provided below.Input the characters inside the brackets [ ] as well.

[ ]

Designates the unit. Designates the axis.

∗: All axes targeted.

[∗∗∗] = All axes[00∗] = All axes for MG41 main unit[01∗] = All axes for MG42 hub unit #01[02∗] = All axes for MG42 hub unit #02 . . . . . .[31∗] = All axes for MG42 hub unit #31

[00A] = Axis A for MG41 main unit[00B] = Axis B for MG41 main unit[00C] = Axis C for MG41 main unit[00D] = Axis D for MG41 main unit

[01A] = Axis A for MG42 hub unit #01[01B] = Axis B for MG42 hub unit #01[01C] = Axis C for MG42 hub unit #01[01D] = Axis D for MG42 hub unit #01 . . . . . .[31A] = Axis A for MG42 hub unit #31[31B] = Axis B for MG42 hub unit #31[31C] = Axis C for MG42 hub unit #31[31D] = Axis D for MG42 hub unit #31

Page 94: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-4 (E) MG40 Series

4-3. Operation Commands

●Operation mode

Th is function is used to switch between the setup mode and measurement mode and acquire the current statuses.

Set Setupmode Ethernet CC-Link

Measurementmode

The command is used to switch between the setup mode and measurement mode.Command format MOD=<Operation mode>

<Operation mode> 0 : Setup mode (Factory setting)1 : Measurement mode

Return format Execution resultsTarget MG41 main unit Save setting values Setting values not saved.Examples of use Transmission : MOD=1 (Set the measurement mode.) Return : OK000 (Successfully completed.)Compatible command None

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command is used to acquire the current operation mode.Command format MOD?Return format MOD=<Operation mode>

<Operation mode> 0 : Setup mode1 : Measurement mode

Target MG41 main unit Example of use Transmission : MOD? (Acquire the current operation mode.) Return : MOD=1 (Current mode is measurement mode.)Compatible command None

Page 95: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-5MG40 Series

●Reset

Th is function is used to set the measurement values to zero.When the speed error status is established, it releases the error.In the wait to go past reference point status, it releases the status. However, in the wait to go past reference point status for master calibration, it does not release this status, and a mode error results.

Set Ethernet CC-LinkMeasurement

mode

This command initiates reset.Command format SVZ Designated axis Return format Execution resultsTarget Designated axis, MG42 hub unit, all axesExamples of use Transmission : SVZ[00A] (Reset axis A for the MG41 main unit.) Return : OK000 (Successfully completed.) Transmission : SVZ[03∗] (Reset all the axes for the MG42 hub unit ID03.) Return : OK000 (Successfully completed.) Transmission : SVZ[∗∗∗] (Reset all the axes for the system.) Return : OK000 (Successfully completed.)Compatible command Designated axis RES

Page 96: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-6 (E) MG40 Series

●Preset

Th is function is used to set numerical values in the measurement values.Note

• In the wait to go past reference point status, a mode error results, and values can neither be set nor called.

• Values can neither be set nor called for an axis in the error status.

Set Ethernet CC-LinkMeasurement

mode

The command sets the numerical values in the current values.Command format PSS Designated axis =<Value>

<Value> Corresponds to output resolution (Factory setting: Zero)

Return format Execution resultsTarget Designated axis, MG42 hub unit, all axesSave setting values Setting values saved.Examples of use Transmission : PSS[01B]=123.2315 (Set axis B for the MG42 hub unit ID01 to 123.2315.) Return : OK000 (Successfully completed.)Compatible command Designated axis P=<Value>

Acquire Ethernet CC-LinkMeasurement

mode

The command acquires the preset values.Command format PSS Designated axis ?Return format PSS Designated axis =<Value>

<Value> Corresponds to output resolution

Target Designated axisExamples of use Transmission : PSS[00A]? (Acquire the preset value of axis A for the MG41 main unit.) Return : PSS[00A]=100.0000 (Th e preset value is 100.0000.)Compatible command None

Call Ethernet CC-LinkMeasurement

mode

The command calls the preset values.Command format PSR Designated axis Return format Execution resultsTarget Designated axis, MG42 hub unit, all axesExamples of use Transmission : PSR[∗∗∗] (Call the preset values for all the axes.) Return : OK000 (Successfully completed.)Compatibility command Designated axis RCL

Page 97: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-7MG40 Series

●Datum point

Th is function is used to set the datum point. Th is function cannot be used when the master calibration function is on. It cannot be used for axes for which the axis calculation function has been set.

Set Ethernet CC-LinkMeasurement

modeThe command sets the datum point position.Command format DPT Designated axis =<Value>

<Value> Corresponds to output resolution (Factory setting: Zero)Return format Execution resultsTarget Designated axisSave setting values Setting values saved.Examples of use Transmission : DPT[31D]=10.12345 (Set the datum point of axis D for the MG42 hub unit ID31 to 10.12345.) Return : OK000 (Successfully completed.)Compatible command Designated axis M=<Value>

Acquire Ethernet CC-LinkMeasurement

modeThe command acquires the value set as the datum point position.Command format DPT Designated axis ?Return format DPT Designated axis =<Value>

<Value> Corresponds to output resolution

Target Designated axisExamples of use Transmission : DPT[00D]? (Acquire the datum point of axis D for the MG41 main unit.) Return : DPT[00D]=11.0000 (Th e datum point of axis D for the MG41 main unit is 11.0000.)Compatible command None

Store datum point off set value Ethernet CC-LinkMeasurement

modeThis stores the datum point off set value.∗ Aft er the command has been transmitted, the wait to go past reference point status is established so initiate the go past

reference point operation. Aft er the reference point has been passed, the datum point off set value is stored in the memory.Command format DPS Designated axis Return format Execution resultsTarget Designated axisExamples of use Transmission : DPS[03B] (Save the datum point off set value for axis B for the MG42 hub unit ID03.) Return : OK000 (Successfully completed.)Compatible command None

Relocate datum point Ethernet CC-LinkMeasurement

modeThe command relocates the datum point position.∗ Aft er the command has been transmitted, the wait to go past reference point status is established so initiate the go past

reference point operation. Aft er the reference point has been passed, the datum point position is relocated.Command format DPR Designated axis Return format Execution resultsTarget Designated axisExamples of use Transmission : DPR[03B] (Relocate the datum point for axis B for the MG42 hub unit ID03.) Return : OK000 (Successfully completed.)Compatible command None

Release wait to go past reference point status Ethernet CC-LinkMeasurement

modeThe command releases the wait to go past reference point status.Command format DPC Designated axis Return format Execution resultsTarget Designated axisExamples of use Transmission : DPC[03B] (Release the wait to go past reference point status for axis B for the MG42 hub unit ID03.) Return : OK000 (Successfully completed.)Compatible command None

Page 98: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-8 (E) MG40 Series

●Reference point information

Th is function is used to acquire the reference point detection status.

Acquire Ethernet CC-LinkMeasurement

mode

The command acquires the reference point detection status.Command format STR Designated axis ?Return format STR Designated axis =<Value>

<Value> 0 : Reference point not detected1 : Wait to go past reference point status2 : Reference point detected

Target Designated axisExample of use Transmission : STR[00A]? (Acquire the reference point status of axis A for the MG41 main

unit.) Return : STR[00A]=1 (Wait to go past reference point status)Compatible command None

Page 99: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-9MG40 Series

●Master

Th is function is used to set and execute master calibration.Th is function can be used when the master calibration function is on. → MCM command

Set master calibration value Ethernet CC-LinkMeasurement

mode

The command sets the master calibration value.Command format MCV Designated axis =<Value>

<Value> Corresponds to output resolution (Factory setting: Zero)

Return format Execution resultsTarget Designated axisSave setting values Setting values saved.Examples of use Transmission : MCV[01B]=123.2315 (Set the master calibration value of axis B for the MG42 hub unit ID01 to 123.2315.) Return : OK000 (Successfully completed.)Compatible command Designated axis MS=<Value>

Acquire master calibration value Ethernet CC-LinkMeasurement

mode

The command acquires the master calibration value.Command format MCV Designated axis ?Return format MCV Designated axis =<Value>

<Value> Corresponds to output resolution

Target Designated axisExamples of use Transmission : MCV[00A]? (Acquire the master calibration value of axis A for the MG41 main unit.) Return : MCV[00A]=100.0000 (Th e master calibration value is 100.0000.)Compatible command None

Relocate master calibraiton value Ethernet CC-LinkMeasurement

mode

The command relocates the master calibration value.∗ Aft er the command has been transmitted, the wait to go past reference point status is established so initiate

the go past reference point operation. Aft er the reference point has been passed, the master calibration value is relocated.

Command format MCR Designated axis Return format Execution resultsTarget Designated axisExamples of use Transmission : MCR[01B] (Relocate the master calibration value of axis B for the MG42 hub unit ID01.) Return : OK000 (Successfully completed.)Compatible command Designated axis MR

Page 100: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-10 (E) MG40 Series

●Start

Th is function is used to restart the peak calculation.

Set Ethernet CC-LinkMeasurement

mode

The command starts updating the peak.Command format STA Designated axis Return format Execution resultsTarget Single axis, MG42 hub unit, all axesExamples of use Transmission : STA[∗∗∗] (Restart the peak calculation for all the axes.) Return : OK000 (Successfully completed.)Compatible command Designated axis START

Page 101: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-11MG40 Series

●Pause

Th is function is used for the pause-related settings and acquisition. Th e latch status cannot be established during pause; nor can the pause status be established during latching.Use the memory data output command for the output of the data in the pause status. Th e data request command cannot be used.

Set pause Ethernet CC-LinkMeasurement

modeThe command sets the pause status.Command format PAU Designated axis =<Setting value>

<Setting value> 0 : Off (Factory setting)1 : On

Return format Execution resultsTarget Single axis, MG42 hub unit, all axesSave setting values Setting values not saved.Examples of use Transmission : PAU[00∗]=1 (Set pause for all the axes for the MG41 main unit.) Return : OK000 (Successfully completed.)Compatible command None

Acquire pause status Ethernet CC-LinkMeasurement

modeThe command acquires the current pause status.Command format PAU Designated axis ?Return format PAU Designated axis =<Setting value>

<Setting value> 0 : Off 1 : On

Target Single axisExamples of use Transmission : PAU[00A]? (Acquire the pause status of axis A for the MG41 main unit.) Return : PAU[00A]=1 (Pause “On” status)Compatible command None

Pause On (Compatible command only)

Ethernet CC-LinkMeasurement

mode

The command establishes the pause status.Command format NoneReturn format Execution resultsTarget Single axis, MG42 hub unit, all axesExamples of use Transmission : [31∗]PAUON (Set pause to “On” for all the axes for the MG42 hub unit ID31.) Return : OK000 (Successfully completed.)Compatible command Designated axis PAUON

Pause Off (Compatible command only)

Ethernet CC-LinkMeasurement

mode

The command releases the pause status.Command format NoneReturn format Execution resultsTarget Single axis, MG42 hub unit, all axesExamples of use Transmission : [01∗]PAUOFF (Set pause to “Off ” for all the axes for the MG42 hub unit ID01.) Return : OK000 (Successfully completed.)Compatible command Designated axis PAUOFF

Page 102: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-12 (E) MG40 Series

●Latch

Th is function is used for the display latch-related settings and acquisition. Th e latch status cannot be established during pause; nor can the pause status be established during latching.Use the memory data output command for the output of the data in the latch status. Th e data request command cannot be used.

Set latch Ethernet CC-LinkMeasurement

modeThe command sets the latch status.Command format LCH Designated axis =<Setting value>

<Setting value> 0 : Off (Factory setting)1 : On

Return format Execution resultsTarget Single axis, MG42 hub unit, all axesSave setting values Setting values not saved.Examples of use Transmission : LCH[00∗]=1 (Set latch for all the axes for the MG41 main unit.) Return : OK000 (Successfully completed.)Compatible command None

Acquire latch status Ethernet CC-LinkMeasurement

modeThe command acquires the current latch status.Command format LCH Designated axis ?Return format LCH Designated axis =<Setting value>

<Setting value> 0 : Off 1 : On

Target Single axisExamples of use Transmission : LCH[00A]? (Acquire the latch status of axis A for the MG41 main unit.) Return : LCH[00A]=1 (Latch “On” status)Compatible command None

Latch On (Compatible command only)

Ethernet CC-LinkMeasurement

mode

The command establishes the latch status.Command format NoneReturn format Execution resultsTarget Single axis, MG42 hub unit, all axesExamples of use Transmission : [31∗]LCHON (Set latch to “On” for all the axes for the MG42 hub unit ID31.) Return : OK000 (Successfully completed.)Compatible command Designated axis LCHON

Latch Off (Compatible command only)

Ethernet CC-LinkMeasurement

mode

The command releases the latch status.Command format NoneReturn format Execution resultsTarget Single axis, MG42 hub unit, all axesExamples of use Transmission : [01∗]LCHOFF (Set latch to “Off ” for all the axes for the MG42 hub unit ID01) Return : OK000 (Successfully completed.)Compatible command Designated axis LCHOFF

Page 103: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-13MG40 Series

●Output data

Th is function is used to set and acquire the types of output data to be acquired by the data request command.

Set output data Setupmode Ethernet CC-Link

Measurementmode

The command sets the type of data to be output by the data request command.Command format OPD Designated axis =<Value>

<Value> 0 : Current value (Factory setting)1 : Maximum value2 : Minimum value3 : Peak to peak value4 : ABS value

Return format Execution resultsTarget Single axis, MG42 hub unit, all axesSave setting values Setting values saved.Examples of use Transmission : OPD[00A]=3 (Output the peak to peak value for axis A for the MG41 main unit.) Return : OK000 (Successfully completed.)Compatible command None

Acquire output data Setupmode Ethernet CC-Link

Measurementmode

The command acquires the type of data to be output by the data request command.Command format OPD Designated axis ?Return format OPD Designated axis =<Value>

<Value> 0 : Current value1 : Maximum value2 : Minimum value3 : Peak to peak value4 : ABS value

Target Single axisExamples of use Transmission : OPD[00B]? (Acquire the output data of axis B for the MG41 main unit.) Return : OPD=1 (Th e output data is the maximum value.)Compatible command None

Page 104: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-14 (E) MG40 Series

●Comparator group number

Th is function is used to select and acquire the comparator group number to be used.

Set Setupmode Ethernet CC-Link

Measurementmode

The command sets the comparator group number to be used.Command format CMS Designated axis =<Group number>

<Group number> 01 : Comparator group number 01 (Factory setting)02 : Comparator group number 02...

16 : Comparator group number 16

Return format Execution resultsTarget Designated axis, MG42 hub unit, all axesSave setting values Setting values saved.Examples of use Transmission : CMS[01B]=05 (Set the comparator group number for axis B for the MG42 hub unit ID01 to 5.) Return : OK000 (Successfully completed.)Compatible command Designated axis SCN=<Group number>

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the comparator group number which has been set.Command format CMS Designated axis ?Return format CMS Designated axis =<Group number>

<Group number> 01 : Comparator group number 0102 : Comparator group number 02...

16 : Comparator group number 16

Target Designated axisExamples of use Transmission : CMS[00A]? (Acquire the comparator group number for axis A for the MG41 main unit.) Return : CMS[00A]=16 (Th e group number is 16.)Compatible command None

Page 105: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-15MG40 Series

●Data request

Th is function is used to re-calculate and output the data.Since the data request command cannot be used in the latch or pause status, use the memory data output command.

Request data of all axes EthernetMeasurement

mode

The command re-calculates the data, and outputs the data of all the axes.Command format RReturn format Data ∗

Target All axesExamples of use Transmission : R Return : [00A]02=-123.4567 ... (omitted)Compatible command R

Request data of designated axis Ethernet CC-LinkMeasurement

mode

The command re-calculates the data, and outputs the data of the designated axis.Command format r Designated axis Return format Data ∗

Target Designated axis, MG42 hub unit Examples of use Transmission : r[00B] Return : [00B]=3.4567Compatible command Designated axis r

∗ For further details, refer to the “5. Data Formats”.

Page 106: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-16 (E) MG40 Series

●Memory data output

Th is function is used to output the memory data.Th e data in the memory is output without re-calculating it.

Current values Ethernet CC-LinkMeasurement

mode

The command outputs the memory data of the current values.Command format MRC Designated axis ?Return format Data ∗

Target Designated axis, MG42 hub unit, all axesExamples of use Transmission : MRC[00∗]? (Acquire the current value memory data for all the axes for the MG41 main unit.)Compatible command Designated axis MN

Maximum values Ethernet CC-LinkMeasurement

mode

The command outputs the memory data of the maximum values.Command format MRA Designated axis ?Return format Data ∗

Target Designated axis, MG42 hub unit, all axesExamples of use Transmission : MRA[00∗]? (Acquire the maximum value memory data for all the axes for the MG41 main unit.)Compatible command Designated axis MA

Minimum values Ethernet CC-LinkMeasurement

mode

The command outputs the memory data of the minimum values.Command format MRI Designated axis ?Return format Data ∗

Target Designated axis, MG42 hub unit, all axesExamples of use Transmission : MRI[00∗]? (Acquire the minimum value memory data for all the axes for the MG41 main unit.)Compatible command Designated axis MI

Peak to peak values Ethernet CC-LinkMeasurement

mode

The command outputs the memory data of the peak to peak values.Command format MRP Designated axis ?Return format Data ∗

Target Designated axis, MG42 hub unit, all axesExamples of use Transmission : MRP[00∗]? (Acquire the peak to peak value memory data for all the axes for the MG41 main unit.)Compatible command Designated axis MP

ABS values Ethernet CC-LinkMeasurement

mode

The command outputs the memory data of the ABS values.Command format MRB Designated axis ?Return format Data ∗

Target Designated axis, MG42 hub unit, all axesExamples of use Transmission : MRB[00∗]? (Acquire the ABS value memory data for all the axes for the MG41 main unit.)Compatible command None

∗ For further details, refer to the “5. Data Formats”.

Page 107: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-17MG40 Series

●Data transmission control

Th is function is used to set start or stop for the data transmission and acquire the current transmission status.

Set EthernetMeasurement

mode

The command sets start or stop for the data transmission.Command format NDT=<Value> <Standby time>

<Value> 0 : Stop transmission (Factory setting)1 : Start transmission

<Standby time> (ms) 10 to 1000 (factory setting: 10 ms)

Standby time: Length of interval time between data transmissions When the specifi ed value is omitted: 10 msReturn format Execution resultsTarget MG41 main unit Save setting values Setting values not saved.Examples of use Transmission : NDT=1 100 Return : OK000 Transmission : NDT=0 100 Return : OK000 Compatible command None

Acquire Setupmode Ethernet

Measurementmode

The command acquires the current data transmission status.Command format NDT?Return format NDT=<Value> <Standby time>

<Value> 0 : Transmission stopped1 : Transmission underway

<Standby time> (ms) 10 to 1000

Target MG41 main unit Examples of use Transmission : NDT? Return : NDT=0 100Compatible command None

Page 108: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-18 (E) MG40 Series

4-4. Setup Commands

●Output resolution

Th is function is used to set and acquire the output resolution.A value lower than the input resolution cannot be set for the output resolution. When the output resolution has been set, Preset, Datum point, Master calibration value, Comparator value, Comparator group number, Pause status and Latch status will be cleared.When STD2 serves as the Area of use setting, the value in parentheses ( ) is used as the output resolution setting.Th e scale diff ers between JPN/STD1 and STD2. When the setting has been established for an area with a diff erent scale, the setting values related to the output resolution will be restored to the factory statuses.

Set Setupmode Ethernet CC-Link

The command sets the output resolution.Command format OPR Designated axis =<Polarity><Resolution>

<Polarity> + : Plus – : Minus

<Resolution>(Input resolution Output resolution)

1 : 0.1 μm (0.000005”) (Factory setting:

Same as for the input resolution setting)

2 : 0.5 μm (0.00001”)∗

3 : 1 μm (0.00005”)4 : 5 μm (0.0001”)5 : 10 μm (0.0005”)

∗0.00002" when the input resolution is 0.5 μmReturn format Execution resultsTarget Designated axisSave setting values Setting values saved.Examples of use Transmission : OPR[00A]=+3 Return : OK000 Compatible command Designated axis SDR=<Polarity><Resolution>

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the output resolution.Command format OPR Designated axis ?Return format OPR Designated axis =<Polarity><Resolution>

<Polarity> + : Plus– : Minus

<Resolution> 1 : 0.1 μm (0.000005”)2 : 0.5 μm (0.00001”)∗

3 : 1 μm (0.00005”)4 : 5 μm (0.0001”)5 : 10 μm (0.0005”)

∗0.00002" when the input resolution is 0.5 μmTarget Designated axisExamples of use Transmission : OPR[00A]? Return : OPR[00A]=+3 Compatible command Designated axis SDR?

Page 109: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-19MG40 Series

●Input resolution

Th is function is used to acquire the input resolution.

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the input resolution setting.Command format IPR Designated axis ?Return format IPR Designated axis =<Resolution>

<Resolution> 1 : 0.1 μm2 : 0.5 μm

Target Designated axisExamples of use Transmission : IPR[00A]? Return : IPR[00A]=1Compatible command None

Page 110: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-20 (E) MG40 Series

●Master calibration function

Th is function is used to set whether the master calibration function is to be used and acquire the setting.Th e master calibration funciton setting is refl ected the next time the equipment is started up.When the master calibration function is to be used, neither the datum point function nor the axis calculation function can be used.

Set Setupmode Ethernet CC-Link

The command sets the master calibration function to On or Off .Command format MCM=<Value>

<Value> 0 : Off (Master calibration is not used.) (Factory setting)1 : On (Master calibration is used.)

Return format Execution resultsTarget MG41 main unit Save setting values Setting values saved.Examples of use Transmission : MCM=1 Return : OK000 Compatible command None

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the current master calibration function status.Command format MCM?Return format MCM=<Value>

<Value> 0 : Off (Master calibration is not used.)1 : On (Master calibration is used.)

Target MG41 main unit Examples of use Transmission : MCM? Return : MCM=0 Compatible command None

Page 111: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-21MG40 Series

●Area of use

Th is function is used to set and acquire the area where the MG40 series is to be used.If it is not set, it will not be possible to transfer from the setup mode to the measuring mode.When the area of use has been set, all set values excluding settings for the network and the area of use will be restored to the factory status.When STD2 serves as the Area of use setting, the value in parentheses ( ) is used as the output resolution setting.Th e scale diff ers between JPN/STD1 and STD2. When the setting has been established for an area with a diff erent scale, the setting values related to the output resolution will be restored to the factory statuses.

Set Setupmode Ethernet CC-Link

The command sets the area where the MG40 series is to be used.Command format CTR=<Value>

<Value> 0 : Not set (Factory setting)1 : JPN (Th is setting must be used if the MG40 series is to be used in Japan.)2 : STD13 : STD2

Return format Execution resultsTarget MG41 main unit Save setting values Setting values saved.Examples of use Transmission : CTR=1 Return : OK000 Compatible command None

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the setting for the area where the MG40 series is to be used.Command format CTR?Return format CTR=<Value>

<Value> 0 : Not set1 : JPN2 : STD13 : STD2

Target MG41 main unit Examples of use Transmission : CTR? Return : CTR=2Compatible command None

Page 112: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-22 (E) MG40 Series

●Comparator mode

Th is function is used to set and acquire the number of comparator level and number of group.When the mode is changed, the comparator value for the target axis is cleared, and the “not set” status is established.

NotePlease set the comparator values (CMV command) immediately aft er the comparator mode (CMM command) has been set. Th e comparator values (CMV command) is set in combination with the comparator mode (CMM command) and will not function correctly if it is made aft er other command setting(s).

Set Setupmode Ethernet CC-Link

The command sets the number of comparator level and number of comparator group as well as the value targeted.Command format CMM Designated axis =<Mode> <Target value>

<Mode> 0 : 2 levels (16 groups) (Factory setting)1 : 4 levels (8 groups)2 : 8 levels (4 groups)3 : 16 levels (2 groups)

<Target value> 0 : Current value (Factory setting)1 : Maximum value2 : Minimum value3 : Peak to peak value

Return format Execution resultsTarget Designated axis, MG42 hub unit, all axesSave setting values Setting values saved.Examples of use Transmission : CMM[00A]=1 0 Return : OK000 Compatible command None

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the comparator mode setting.Command format CMM Designated axis ?Return format CMM Designated axis =<Mode> <Target value>

<Mode> 0 : 2 levels (16 groups)1 : 4 levels (8 groups)2 : 8 levels (4 groups)3 : 16 levels (2 groups)

<Target value> 0 : Current value1 : Maximum value2 : Minimum value3 : Peak to peak value

Target Designated axisExamples of use Transmission : CMM[00A]? Return : CMM[00A]=3 1Compatible command None

Page 113: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-23MG40 Series

●Comparator value

Th is function is used to set and acquire the comparator values.Th e setting range diff ers depending on the comparator mode.

NotePlease set the comparator values (CMV command) immediately aft er the comparator mode (CMM command) has been set. Th e comparator values (CMV command) is set in combination with the comparator mode (CMM command) and will not function correctly if it is made aft er other command setting(s).

Precautions when setting the comparator values• Set the comparator values in sequence from level 1 starting with the lowest value. (Level 1 setting value < Level 2 setting value < Level 3 setting value < ... < Level 16 setting value)• Th e comparator value of each level to be set cannot be lower than the setting value of the previous

level. (Example: An error will result if “5” is set for level 2 when “10” has been set for level 1.)• If, when the settings are to be changed, the setting value is higher than that of the subsequent level, all

the setting values of the subsequent levels will be canceled. (Example: If, when “10” is set for level 1, “20” is set for level 2, “30” is set for level 3 and “40” is set for level

4, the setting value for level 2 is changed to 40, the setting values for level 3 and 4 will be canceled.)

Set Setupmode Ethernet CC-Link

The command sets the comparator values.Command format CMV Designated axis <Group number><Level number>=<Value>

<Group number> 01 : Group 1 to 16 : Group 16

Th ere are no factory settings.

<Level number> 01 : Level 1 to 16 : Level 16<Value> Corresponds to output

resolution digit (setting cleared when no value is input).

Return format Execution resultsTarget Designated axis, MG42 hub unit, all axesSave setting values Setting values saved.Examples of use Transmission : CMV[00A]0101=12.3335 (Set 12.3335 for group number 01 and level number 01 of axis A for the MG41 main unit.) Return : OK000 Transmission : CMV[00B]0101= (Clear the comparator setting value for group number 01 and level number 01 of axis B for the MG41 main unit.) Return : OK000Compatible command None

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the comparator values.Command format CMV Designated axis <Group number><Level number>?Return format CMV Designated axis <Group number><Level number>=<Value>

<Group number> 01 : Group 1 to 16 : Groups 16 <Level number> 01 : Level 1 to 16 : Level 16<Value> Corresponds to output resolution digit (no output when

the value has not been set).

Target Designated axisExamples of use Transmission : CMV[00A]0101? Return : CMV[00A]0101=12.3335 (12.3335 is the comparator value.) Transmission : CMV[00B]0101? Return : CMV[00B]0101= (No setting)Compatible command None

Page 114: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-24 (E) MG40 Series

●Data header

Th is function is used to set and acquire the data header.

Set data header Setupmode Ethernet

The command sets the data header.Command format HDR=<Header>

<Header> 00 : None01 : Type 1 (Factory setting)02 : Type 2For details on the types, refer to “5. Data Formats”.

Return format Execution resultsTarget MG41 main unit Save setting values Setting values saved.Examples of use Transmission : HDR=01 Return : OK000 Compatible command None

Acquire data header Setupmode Ethernet

Measurementmode

The command acquires the data header setting.Command format HDR?Return format HDR=<Header>

<Header> 00 : None01 : Type 102 : Type 2

Target MG41 main unit Examples of use Transmission : HDR? Return : HDR=01Compatible command None

Data header On (Compatible command only)

Setupmode Ethernet

The command sets the data header to type 1.Command format NoneReturn format Execution resultsTarget MG41 main unit Examples of use Transmission : HON Return : OK000 Compatible command HON

Data header Off (Compatible command only)

Setupmode Ethernet

The command sets the data header to “None.”Command format NoneReturn format Execution resultsTarget MG41 main unit Examples of use Transmission : HOF Return : OK000 Compatible command HOF

Page 115: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-25MG40 Series

●Data axis separator

Th is function is used to set and acquire the axis separator character used when data is to be output.

Set Setupmode Ethernet

The command sets the axis separator used when data is to be output.Command format SEP=<Value>

<Value> 0 : Space (Factory setting)1 : Line feed (CR+LF)

Return format Execution resultsTarget MG41 main unit Save setting values Setting values saved.Examples of use Transmission : SEP=1 Return : OK000 Compatible command None

Acquire Setupmode Ethernet

Measurementmode

The command acquires the axis separator used when data is to be output.Command format SEP?Return format SEP=<Value>

<Value> 0 : Space1 : Line feed (CR+LF)

Target MG41 main unit Examples of use Transmission : SEP? Return : SEP=1 Compatible command None

Page 116: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-26 (E) MG40 Series

●Axis calculation function

Th is function is used to set and acquire the axis calculation.Th e axis calculation function can be set for axes which satisfy two conditions, that is to say, they must be in the same unit and they must have the same input resolution.Th e calculation results are output as the primary axis data.Th e axis which has been set as the primary axis cannot be set as the reference axis.To clear the axis calculation setting, only the plus sign and axis labels are sent.Neither the datum point function nor the master calibration function can be used for an axis which has been set as the primary axis.Reset/Preset/Datum point function/Master calibration function/Start/Pause/Latch/Output data/Comparator functions/Data request/Memory data output and Output resolution command cannot be used for an axis which has been set as the reference axis.When the axis calculating function has been set, Preset, Datum point, Master calibration value, Comparator value, Comparator group number, Pause status and Latch status will be cleared.

Set Setupmode Ethernet CC-Link

The command sets the axis calculation.Command format ADD=<Sign 1> Primary axis <Sign 2> Reference axis ADD=+ Primary axis (Clear the settings.)

<Sign 1><Sign 2> + : Plus Th ere are no factory

settings.– : Minus

Primary axis , Reference axis Axis labels

Return format Execution resultsTarget Designated axisSave setting values Setting values saved.

Examples of use Transmission : ADD=+[00A]+[00B] Return : OK000 Transmission : ADD=‒[31A]+[31D] Return : OK000 Transmission : ADD=+[31A] (Clear the setting.) Return : OK000 Compatible command None

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the axis calculation setting. Command format ADD Primary axis ?Return format ADD=<Sign 1> Primary axis <Sign 2> Reference axis

<Sign 1><Sign 2> + : Plus – : Minus

Primary axis , Reference axis Axis labels

Target Designated axisExamples of use Transmission : ADD[00A]? Return : ADD=+[00A]+[00B] Transmission : ADD[31A]? Return : ADD=‒[31A]+[31D] Transmission : ADD[31A]? Return : ADD=+[31A] (No settings) Compatible command None

Page 117: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-27MG40 Series

●Confi guration information

Th is function is used to acquire the equipment confi guration information.

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the equipment confi guration information.Command format CFG Target equipment ?

Target equipment [00∗] : MG41 main unit [01∗] : MG42 hub unit ID01[02∗] : MG42 hub unit ID02...[31∗] : MG42 hub unit ID31[∗∗∗] : Entire system

Return format CFG Target equipment =<No. of units> <Total no. of axes> <Connection MAP>

Target equipment [00∗] : MG41 main unit [01∗] : MG42 hub unit ID01[02∗] : MG42 hub unit ID02...[31∗] : MG42 hub unit ID31[∗∗∗] : Entire system

<No. of units> 01-32 : Total number of units - MG41 main unit and MG42 hub units - which confi gure the system

<Total no. of axes> 000-100 : Total number of axes which are connected to the system and are recognized

<Connection MAP> {<Model code> <ID> <Connection pattern> ...}(Space separators enclosed in braces)

<Model code> 11 : MG41-NE12 : MG41-NC21 : MG42-4

<ID> 00–31 : Unit ID (“00” for the MG41 main unit)<Connection pattern> 00–0F : Bit pattern using the locations connected

as “1”

Target Entire system, units with target IDs designated Examples of use Transmission : CFG[∗∗∗]? (Acquire the confi guration information of the entire system.) Return : CFG[∗∗∗]=04 008 {110003 21050A 21210C 213106} Transmission : CFG[00∗]? (Acquire the confi guration information of the MG41 main unit.) Return : CFG[00∗]=04 008 {110003} Transmission : CFG[05∗]? (Acquire the confi guration information of MG42 hub unit ID05.) Return : CFG[05∗]=04 008 {21050A} Transmission : CFG[21∗]? (Acquire the confi guration information of MG42 hub unit ID21.) Return : CFG[21∗]=04 008 {21210C}Compatible command None

Page 118: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-28 (E) MG40 Series

●Setting initialization

Th is function is used to initialize the settings.When initializing the entire system to the factory status, set INI[∗∗∗]=0.To store the initialized settings in the non-volatile memory of the MG41 main unit, initiate the save setting values operation. → Save setting values (SAV command)

Set Setupmode Ethernet CC-Link

The command initializes the settings.Command format INI Designated axis =<Initialization level>

<Initialization level> 0 : Factory status (Excludes network setting)1 : Initializes the numerical value setting (Preset/Datum point/Master calibration value/ Comparator value/Comparator group number)

Return format Execution resultsTarget Factory status : Entire system Initializes the numerical value setting : Designated axis, MG42 hub unit, all axesExamples of use Transmission : INI[∗∗∗]=0 (Th e entire system is initialized to the factory status.) Return : OK000 Transmission : INI[03∗]=1 (Th e numerical value settings of all axes for MG42 hub unit ID03 are initialized.) Return : OK000 Compatible command None

Page 119: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-29MG40 Series

●Save setting values

Th is saves the current setting values in the non-volatile memory of the MG41 main unit.Th e saved setting values are retained even aft er the power has been turned off .Use caution with the following points since the setting values will be lost when the power of the MG41 main unit is turned off while setting values are being saved. When a command response is returned

Do not turn off the power until the command execution results are returned. When a command response is not returned

Do not turn off the power for at least three seconds aft er the save setting value command has been transmitted.

→ Command response (CRP command)

Save setting values Setupmode Ethernet CC-Link

The command saves the setting values.Command format SAVReturn format Execution resultsTarget Entire systemSave setting values Setting values saved.Examples of use Transmission : SAV Return : OK000 Compatible command None

Page 120: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-30 (E) MG40 Series

●Version information

Th is function is used to set and acquire the version information of the MG41 main unit/MG42 hub unit.

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the version information.Command format VER Target equipment ?

Target equipment [00∗] : MG41 main unit [01∗] : MG42 hub unit ID01[02∗] : MG42 hub unit ID02...[31∗] : MG42 hub unit ID31

Return format VER Target equipment =<Version number>

Target equipment [00∗] : MG41 main unit [01∗] : MG42 hub unit ID01[02∗] : MG42 hub unit ID02...[31∗] : MG42 hub unit ID31

<Version information> Version information

Target MG41 main unit, MG42 hub unit Examples of use Transmission : VER[00∗]? Return : VER[00∗]=S010000 F010100 P010000 B122Compatible command None

Page 121: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-31MG40 Series

●Error information

Th is function is used to acquire the error information.Th e errors listed in the log but not yet sent are sent in sequence starting with the latest one.

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the error information.Command format ERR?Return format ERR=<Date/time of occurrence> <Area of occurrence> <Error code> ERR= (When there are no errors which have yet to be sent)

<Date/time of occurrence> DDHHMMSS format (8 characters)<Area of occurrence> Target equipment code or designated axis code

(5 characters)<Error code> Refer to “6. Error Codes” (2 characters).

Target Entire systemExamples of use Transmission : ERR? Return : ERR=28123456 [01∗] A0 (An A0 error occurred in MG42 hub unit ID01 at 12 hours 34 minutes 56 seconds on 28th.) Transmission : ERR? Return : ERR=28203400 [01B] 61 (A 61 error occurred in axis B for hub unit ID01 at 20 hours 34 minutes 00 seconds on 28th.) Transmission : ERR? Return : ERR= (No error)Compatible command None

Page 122: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-32 (E) MG40 Series

●Internal clock

Th is function is used to set the clock inside the MG41 main unit and acquires its information.With this product, the year must be indicated using two digits.

Set Setupmode Ethernet CC-Link

The command sets the clock inside the MG41 main unit.Command format CLK=<Value>

<Value> YYMMDDHHMMSS format

Return format Execution resultsTarget MG41 main unit Examples of use Transmission : CLK=081212145632 (Set the time to 14 hours 56 minutes 32 seconds on December 12, 2008.) Return : OK000 Compatible command None

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires the current time of the clock inside the MG41 main unit.Command format CLK?Return format CLK=<Value>

<Value> YYMMDDHHMMSS format

Target MG41 main unitExamples of use Transmission : CLK? Return : CLK=090228143012 (14 hours 30 minutes 12 seconds on February 28, 2009.)Compatible command None

Page 123: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-33MG40 Series

●Command response

Th is function is used to set whether or not the execution results are to be returned in response to each command.Even when it is set to “no response,” the response to the CRP command itself is returned.

Set Setupmode Ethernet CC-Link

The command sets whether to return the execution results in response to each command.Command format CRP=<Value>

<Value> 0 : No response1 : Response (Factory setting)

Return format Execution resultsTarget MG41 main unit Save setting values Setting values saved.Examples of use Transmission : CRP=0 Return : OK000 Transmission : CRP=1 Return : OK000 Compatible command None

Acquire Setupmode Ethernet CC-Link

Measurementmode

The command acquires whether or not the execution results are to be returned.Command format CRP?Return format CRP=<Value>

<Value> 0 : No response1 : Response

Target MG41 main unitExamples of use Transmission : CRP? Return : CRP=1Compatible command None

Page 124: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-34 (E) MG40 Series

●Ethernet station number

Th is function is used to acquire the Ethernet station number. Th e setting is established using the DIP switches on the MG41 main unit.

Acquire Setupmode Ethernet

Measurementmode

The command acquires the Ethernet station number.Command format NID?

<Station number> 00 to 07

Return format NID=<Station number>Target MG41 main unitExamples of use Transmission : NID? Return : NID=03Compatible command None

Page 125: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-35MG40 Series

●IP address

Th is function is used to set and acquire the Ethernet source station IP address.Th e IP address setting is refl ected the next time the equipment is started up.When an IP address is acquired aft er its setting has been changed, the IP address set before the change is refl ected will be acquired.

Set Setupmode Ethernet

The command sets the Ethernet source station IP address.Command format NIP=<IP address>

<IP address> 1.0.0.1 to 223.255.255.254 (excluding 127.x.x.x)(Factory setting: 192.168.1.100)

Return format Execution resultsTarget MG41 main unitSave setting values Setting values saved. (Th e setting values are saved at the same time as the setting command is executed.)Examples of use Transmission : NIP=192.168.1.10 Return : OK000Compatible command None

Acquire Setupmode Ethernet

Measurementmode

The command acquires the Ethernet source station IP address.Command format NIP?Return format NIP=<IP address>

<IP address> 1.0.0.1 to 233.255.255.254

Target MG41 main unit Examples of use Transmission : NIP? Return : NIP=192.168.1.10Compatible command None

Page 126: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-36 (E) MG40 Series

●MAC address

Th is function is used to acquire the Ethernet MAC address.

Acquire Setupmode Ethernet

Measurementmode

The command acquires the Ethernet MAC address.Command format NMC?Return format NMC=<MAC address>

<MAC address> xx:xx:xx:xx:xx:xx ( “x” is a number from 0 to 9 or a letter from A to F)

Target MG41 main unitExamples of use Transmission : NMC? Return : NMC=00:12:44:CE:3E:F5Compatible command None

Page 127: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-37MG40 Series

●Gateway address

Th is function is used to set and acquire the Ethernet gateway address.Th e gateway address setting is refl ected the next time the equipment is started up.

Set Setupmode Ethernet

The command sets the Ethernet gateway address.Command format NGW=<Address>

<Address> 1.0.0.1 to 223.255.255.254 (excluding 127.x.x.x)(Factory setting: 192.168.1.1)

Return format Execution resultsTarget MG41 main unit Save setting values Setting values saved. (Th e setting values are saved at the same time as the setting command is executed.)Examples of use Transmission : NGW=192.168.1.1 Return : OK000Compatible command None

Acquire Setupmode Ethernet

Measurementmode

The command acquires the gateway address.Command format NGW?Return format NGW=<Address>

<Address> 1.0.0.1 to 223.255.255.254

Target MG41 main unit Examples of use Transmission : NGW? Return : NGW=192.168.1.1Compatible command None

Page 128: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-38 (E) MG40 Series

●Subnet mask

Th is function is used to set and acquire the subnet mask.Th e value which has been set is refl ected the next time the system is started up.When the subnet mask is acquired aft er its setting has been changed, the subnet mask set before the change is refl ected will be acquired.

Set Setupmode Ethernet

The command sets the subnet mask.Command format NSM=<Subnet mask>

<Subnet mask> 0.0.0.0 to 255.255.255.255 (Factory setting: 255.255.255.0)

Return format Execution resultsTarget MG41 main unitSave setting values Setting values saved. (Th e setting values are saved at the same time as the setting command is executed.)Examples of use Transmission : NSM=255.255.0.0 Return : OK000Compatible command None

Acquire Setupmode Ethernet

Measurementmode

The command acquires the subnet mask.Command format NSM?Return format NIP=<Subnet mask>

<Subnet mask> 0.0.0.0 to 255.255.255.255

Target MG41 main unit Examples of use Transmission : NSM? Return : NIP=255.255.255.0Compatible command None

Page 129: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-39MG40 Series

●Data transmission protocol

Th is function is used to set the protocol which is to be used by the data interface.

Set Setupmode Ethernet

The command sets the protocol which is to be used by the data interface.Command format NPC=<Value>

<Value> 0 : TCP (Factory setting)1 : UDP

Return format Execution resultsTarget MG41 main unitSave setting values Setting values saved. Examples of use Transmission : NPC=0 Return : OK000Compatible command None

Acquire Setupmode Ethernet

Measurementmode

The command acquires the protocol which is used by the data interface.Command format NPC?Return format NPC=<Value>

<Value> 0 : TCP1 : UDP

Target MG41 main unitExamples of use Transmission : NPC? Return : NPC=0Compatible command None

Page 130: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-40 (E) MG40 Series

●Data transmission port number

Th is function is used to set the number of the port which is to be used by the data interface.With internet, since port numbers 1 to 1023 are generally used by regular internet services and port numbers 1024 to 49151 may have already been registered, 49152 or a higher number is usually used as the port number.However, this does not apply for a network operating inside a company so the MG40 series supports all the port numbers in the range of 1 to 65535 under the IP standards with the exception of numbers 20, 21, 23 and 80.When an error occurs in the setting command, it may be that the port number concerned cannot be used, so try a diff erent port number.

Set Setupmode Ethernet

The command sets the number of the port which is to be used by the data interface.Command format NPN=<Value>

<Value> 1 to 65535 (with the exception of numbers 20, 21, 23, 80, 52023 and 52024) (Factory setting: 49154)

Return format Execution resultsTarget MG41 main unitSave setting values Setting values saved.Examples of use Transmission : NPN=49153 Return : OK000Compatible command None

Acquire Setupmode Ethernet

Measurementmode

The command acquires the number of the port used by the data interface.Command format NPN?Return format NPN=<Value>

<Value> 1 to 65535 (with the exception of numbers 20, 21, 23, 80, 52023 and 52024)

Target MG41 main unitExamples of use Transmission : NPN? Return : NPN=49153Compatible command None

Page 131: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-41MG40 Series

●Measuring unit product information

Th is function is used to acquire the product information of the measuring unit which has been connected.

Acquire Setupmode Ethernet CC-Link

The command acquires the product information of the measuring unit which has been connected.Command format AXP Designated axis ?Return format AXP Designated axis =<Product code> <Production year/month/day> <Serial number>

<Product code> Product code (8 characters)<Serial number> Serial number (6 characters)<Production year/month/day> YYMMDD format (6 characters)

Target Designated axisExamples of use Transmission : AXP[00A]? Return : AXP[00A]=12345678 100001 090220Compatible command None

Page 132: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-42 (E) MG40 Series

●Measuring unit maintenance information

Th is function is used to acquire the maintenance information of the measuring unit which has been connected.

Acquire Setupmode Ethernet CC-Link

The command acquires the maintenance information of the measuring unit which has been connected.Command format AXM Designated axis ?Return format AXM Designated axis =<Total number of errors> <Total number of sliding operations>

<Total power-on time>

<Total number of errors> 00000 ~ 65534 (5 characters) *<Total number of sliding operations> 0000000 ~ 3354428 (7 characters)

(1 = reciprocation) *<Total power-on time> (h) 00000 ~ 65534 (5 characters) *

Note• Th e number of sliding operations is only a guideline.• When the reciprocal distance is less than 1 mm, it is not counted as sliding

operations.

* When the upper limit value is reached, the value will remain unchanged.

Target Designated axisExamples of use Transmission : AXM[00A]? Return : AXM[00A]=00001 0002343 00104 (Number of errors: 1; number of sliding operations: 2343 reciprocal

operations, total power-on time: 24 hours)Compatible command None

Page 133: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 4-43MG40 Series

●Measuring unit user information

Th is function is used to set/acquire the user information of the measuring unit which has been connected.

Set Setupmode Ethernet CC-Link

The command sets the user information of the measuring unit which has been connected.Command format AXU Designated axis =<User ID>

<User ID> Hexadecimal ASCII notation (2 characters)

Return format Execution resultsTarget Designated axisSave setting values Setting values saved. (Th e setting values are saved at the same time as the setting command is executed.)Examples of use Transmission : AXU[00A]=01 Return : OK000Compatible command None

Acquire Setupmode Ethernet CC-Link

The command acquires the user information of the measuring unit which has been connected.Command format AXU Designated axis ?Return format AXU Designated axis =<User ID>

<User ID> Hexadecimal ASCII notation (2 characters)

Target Designated axisExamples of use Transmission : AXU[00A]? Return : AXU[00A]=00Compatible command None

Page 134: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

4-44 (E) MG40 Series

Page 135: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 5-1MG40 Series

5. Data Formats

Note• When a Store datum point off set value, Relocate datum point, Relocate master calibration value or

Master calibration function setting has been performed, neither Data request nor Memory data output can be undertaken unless the reference point is passed.

• Aft er the reference point has been passed, the peak value becomes unstable. When using the peak value, set to Start and then acquire the peak value.

5-1. Overview of Data Formats

“Data format” refers to the format in which the data is output in the following cases.

Data format ASCII data • Data returned when the data request command is sent Binary data • Data transmitted when the function for continuous data transmission via Ethernet is used • Remote registers in CC-Link

5-2. ASCII Data

Th e ASCII data format is used for the responses given to the data request and memory data output commands.

Th e data of single axis is confi gured as shown below: Header Data CR LF

Th e data of a multiple number of axes is confi gured as shown in the example below:(For 3 axes) Header 1 Data 1 Axis separator Header 2 Data 2 Axis separator Header 3 Data 3 CR LF

Th e header contents are selected using the HDR (data header) command, and the axis separators by the SEP (separator character) command.

Header type Header specifi cation Example

None (No headers are output.) (No headers are output.)Type 1 <Axis label>= [00A]= [03B]= [31D]=Type 2 <Axis label><Comparator results><Output data> [00A]02C00= <Error information><Reference point information>= [03B]14P00= [31D]00B02=

<Axis label> Th e axis label is output as follows.

[00A] = Axis A for MG41 main unit[00B] = Axis B for MG41 main unit[00C] = Axis C for MG41 main unit[00D] = Axis D for MG41 main unit

[01A] = Axis A for MG42 hub unit #01[01B] = Axis B for MG42 hub unit #01[01C] = Axis C for MG42 hub unit #01[01D] = Axis D for MG42 hub unit #01 . . . . . .[31A] = Axis A for MG42 hub unit #31[31B] = Axis B for MG42 hub unit #31[31C] = Axis C for MG42 hub unit #31[31D] = Axis D for MG42 hub unit #31

Page 136: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

5-2 (E) MG40 Series

<Comparator results>Th e comparator results are expressed as 2-digit integers from 00 to 16 depending on the number of levels set.

0 : Measurement value < Setting value 11 : Setting value 1 Measurement value < Setting value 22 : Setting value 2 Measurement value < Setting value 3 . . .15 : Setting value 15 Measurement value < Setting value 1616 : Setting value 16 Measurement value

<Output data>Th e type of data which is output is indicated by a letter of the alphabet.

C : Current value A : Maximum value I : Minimum value P : P-P value B : ABS value

<Error information>Th e axis error information is indicated using a hexadecimal 1-digit bit pattern.

7 6 5 4 3 2 1 0

Reserved (always zero) Level alarm Speed alarm

0 : No error, no alarm1 : Speed alarm is occurring.2 : Level alarm is occurring.3 : Speed alarm and level alarm are occurring.

<Reference point information>Th e reference point detection status is indicated using a hexadecimal 1-digit bit pattern.

0 : Reference point not detected1 : Wait to go past reference point2 : Reference point detected

Th e data is output at the resolution set for the output resolution using signed 7-digit data with a decimal point and with zeros suppressed.A space is used as the plus sign when a value is positive. –123.4567

– 1 2 3 . 4 5 6 7

0.2900

0 . 2 9 0 0

When the measuring unit is in the speed alarm or level alarm status, the “Error” characters are output until reset is initiated. Error

E r r o r

If the measuring result data consist of more than 7 digits, “F” is output as the highest-level digit to indicate that an overfl ow has occurred. Use in a range where an “F” will not be output. When –1000.2531 is to be displayed

– F 0 0 . 2 5 3 1

Page 137: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 5-3MG40 Series

5-3. Binary data

Th e binary data format is used in the cases below.• When the function for continuous data transfer via Ethernet, which uses the TCP or UDP protocol, is

used • When data is requested using CC-Link

Under the binary data format, any unit (a main unit or hub unit) to which even one valid axis is connected is considered as valid, and 32-byte fi xed-length data is used for each unit.All zeros are used for the status and data of an axis which is not connected.

When Ethernet is used:Minimum data size: 1 valid unit (with 1 to 4 valid axes): 32 bytes

Hub unitID02 data32 bytes

Maximum data size: 25 valid units (with 25 to 100 valid axes): 800 bytes

Main unitID00 data32 bytes

(ID00 is used only for the MG41 main unit.)

Hub unitID01 data32 Bytes

Hub unitID02 data32 Bytes

|

Hub unitID31 data32 Bytes

When CC-Link is used:Since the size of the remote registers is 32 bytes, the data of a single designated unit is always designated and acquired.To acquire the data of a multiple number of units, issue the commands in sequence from the PLC to acquire it.

Hub unitID05 data32 Bytes

In order to synchronize the data of a multiple number of units, use the latch command, and then collect the data of each unit using the memory data output command.

Page 138: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

5-4 (E) MG40 Series

Th e data of the units is confi gured as shown below.Th e axis data consists of signed 32-bit integers which are stored using the little endian order.

Byte Description00 Axis A status0102

Axis A dataSigned 32-bit integerLittle endian order

03040506 Axis B status0708

Axis B dataSigned 32-bit integerLittle endian order

09101112 Axis C status1314

Axis C dataSigned 32-bit integerLittle endian order

15161718 Axis D status1920

Axis D dataSigned 32-bit integerLittle endian order

21222324

Supplementary information

25262728293031

●Axis statuses

bit

Byte 7 6 5 4 3 2 1 0

0 Axis label Decimal point position

1 Error information Reference point information

Axis labels: 0 : Not connected (no data) 1 : Axis A 2 : Axis B 3 : Axis C 4 : Axis D

Error information: The axis error information is indicated using a hexadecimal 1-digit bit pattern. bit0 : Speed alarm bit1 : Level alarm bit2 : Communication error bit4 : Reserved (always zero)

Decimal point position: The coeffi cients for converting the measurement result data stored as integers into a length unit are stored here. 0 : 10 0

1 : 10–1

2 : 10–2

3 : 10–3

4 : 10–4

5 : 10–5

6 : 10–6

7 : 10–7

Reference point information: The reference point detection status is indicated using a hexadecimal 1-digit bit pattern. 0 : Reference point not detected 1 : Wait to go past reference point 2 : Reference point detected

Page 139: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 5-5MG40 Series

●Axis data

bit

Byte 7 6 5 4 3 2 1 0

0

Axis data32-bit integers in little endian order

1

2

3

Th e measurement results of the axes are stored here using the 32-bit signed little endian order. If the error information for the axis status is not 0, it means that an error has occurred so do not use

the axis data.

●Supplementary information

bit

Byte 7 6 5 4 3 2 1 0

0 Hub unit ID

1 Axis A comparator result

2 Axis B comparator result

3 Axis C comparator result

4 Axis D comparator result

5

Time stamp6

7

Hub unit ID : Hub unit ID (0 to 31)Comparator results : 0 : Measurement value < Setting value 1 1 : Setting value 1 Measurement value < Setting value 2 2 : Setting value 2 Measurement value < Setting value 3 . . . 15 : Setting value 15 Measurement value < Setting value 16 16 : Setting value 16 Measurement valueTime stamp : 1/128 s (7.8125 ms) counter value referenced to AM 0:00 of the internal clock of the MG41 main unit

Page 140: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

5-6 (E) MG40 Series

Page 141: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

(E) 6-1MG40 Series

6. Error Codes

6-1. Overview of Error Codes

Error codes are expressed in a hexadecimal 2-digit format (0x00 to 0xFF).Th e higher digits express the general classifi cation, and the lower digits express the details.

Classifi cation Description

Numbers in the 00’s General information

Numbers in the 10’s Command-related errors

Numbers in the 20’s Ethernet communication-related errors

Numbers in the 30’s CC-Link communication-related errors

Numbers in the A0’s to D0’s Hardware-related errors

6-2. Table of Error Codes

Numbers in the 00’s: General information, additional information

00 No errors/no additional information (Normally used when there are no errors.)

Numbers in the 10’s: Command-related errors

10 Command error Th ere is no command or the command has illegal syntax.

12 Mode error Th e mode does not permit the execution of the command in question.

13 Target not available Th e target designated as the command target is not connected to the system or the wrong method was used to designate it (such as in cases where all the axes were designated with a command for which all the axes cannot be designated).

14 Parameter error Th e parameter does not exist or the wrong method was used to designate it.

Numbers in the 20’s: Ethernet communication-related errors

20 Network Setting Error Th ere is a problem in the network settings.

21 Connection Error (Command Interface)

Connection with the command interface has failed.

22 Connection Error (Data Interface) Connection with the data interface has failed.

Numbers in the 30’s: CC-Link communication-related errors

30 Setting Error One or more station number setting switches or transmission speed setting switches have been set outside the range of specifi cations.

31 Communication Error Communication has timed out.A disconnected cable, broken cable or equipment failure may be to blame.

Page 142: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

6-2 (E) MG40 Series

Numbers in the A0’s: Main unit hardware-related errors

A0 Communication timeout Communication has timed out.A disconnected cable, broken cable, power supply trouble or equipment failure may be to blame.

A1 Communication error Th ere is an error in what has been communicated.Noise, cable trouble or an equipment failure may be to blame.

A2 Power supply error Th e supply voltage is insuffi cient.Check the power supplies.

A4 Version mismatch Th e version combination does not enable operation.

A5 Save setting value memory error Th e settings were initialized to the factory settings due to errors in the contents of the memory where the setting values were saved.

Numbers in the B0’s: Hub unit hardware-related errors

B0 Communication timeout Communication has timed out.A disconnected cable, broken cable, power supply trouble or equipment failure may be to blame.

B1 Communication error Th ere is an error in what has been communicated.Noise, cable trouble or an equipment failure may be to blame.

B2 Power supply error Th e supply voltage is insuffi cient.Check the power supplies.

Numbers in the C0’s: Measuring unit-related errors

C0 Communication error Measuring unit has detected an error in the communication system.

C1 System error Measuring unit has detected system trouble.

Page 143: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

このマニュアルに記載されている事柄の著作権は当社にあり、説明内容は機器購入者の使用を目的としています。したがって、当社の許可なしに無断で複写したり、説明内容 ( 操作、保守など ) と異なる目的で本マニュアルを使用することを禁止します。

The material contained in this manual consists of information that is the property of Magnescale Co., Ltd. and is intended solely for use by the purchasers of the equipment described in this manual.Magnescale Co., Ltd. expressly prohibits the duplication of any portion of this manual or the use thereof for any purpose other than the operation or maintenance of the equipment described in this manual without the express written permission of Magnescale Co., Ltd.

Le matériel contenu dans ce manuel consiste en informations qui sont la propriété de Magnescale Co., Ltd. et sont destinées exclusivement à l'usage des acquéreurs de l'équipement décrit dans ce manuel.Magnescale Co., Ltd. interdit formellement la copie de quelque partie que ce soit de ce manuel ou son emploi pour tout autre but que des opérations ou entretiens de l'équipement à moins d'une permission écrite de Magnescale Co., Ltd.

Die in dieser Anleitung enthaltenen Informationen sind Eigentum von Magnescale Co., Ltd. und sind ausschließlich für den Gebrauch durch den Käufer der in dieser Anleitung beschriebenen Ausrüstung bestimmt.Magnescale Co. , Ltd. untersagt ausdrücklich die Vervielfältigung jeglicher Teile dieser Anleitung oder den Gebrauch derselben für irgendeinen anderen Zweck als die Bedienung oder Wartung der in dieser Anleitung beschr iebenen Ausrüstung ohne ausdrück l iche schriftliche Erlaubnis von Magnescale Co., Ltd.

Page 144: MG40 SeriesMG40 Series (J) 1-3 1-3. 実行結果とエラー 設定コマンドと取得コマンドを送信すると、MG41メインユニットはコマンドの文法やパラメー

2015.1©2009 Magnescale Co., Ltd.

MG40 Series4-146-063-0B

〒 259-1146 神奈川県伊勢原市鈴川 45

45 Suzukawa, Isehara-shi, Kanagawa 259-1146, Japan

日本からの輸出時における注意本製品(および技術)は輸出令別表第1の16の項(外為令別表16の項)に該当します。キャッチオール規制による経済産業省の許可要否につきましては、輸出者様にてご確認ください。

For foreign customersNote: Th is product (or technology) may be restricted by the government in your country. Please make sure that end-use, end user and country of destination of this product do not violate your local government regulation.